No worries :-)<br><br>I understand that lxc rootfs is sacred . . . :-)<br><br>This was just a question about how to archive and move an lxc container.<br><br>I wrote my note because I've made a mistake -- in my haste, un-packing one place and then using cp to the lxc container site.<br>
<br>Regards,<br>Masood<br><br><div class="gmail_quote">On Thu, Feb 28, 2013 at 12:32 AM, Nuno Seita[EmergeIT] <span dir="ltr"><<a href="mailto:nuno.seita@emerge.pt" target="_blank">nuno.seita@emerge.pt</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Hi Masood,<br>
<br>
dont cp files around, just use tar with -C
/final/destination/directory, that way your telling tar where to
unpack.<br>
<br>
Hope it helps,<br>
<br>
Regards<div><div class="h5"><br>
<pre cols="72"></pre>
On <a href="tel:27-02-2013%2019" value="+12702201319" target="_blank">27-02-2013 19</a>:12, Masood Mortazavi wrote:<br>
</div></div></div><div><div class="h5">
<blockquote type="cite">Hi Miroslav,<br>
<br>
<div style="margin-left:40px">Thank you very much. This worked.<br>
<br>
However, on the way, I discovered one other relevant point worth
noting:<br>
<br>
When unpacking the tar of the lxc, it should be unpacked with <br>
<br>
tar --numeric-owner -xzvf lxc.tgz<br>
<br>
into its *final* destination (i.e. to the final resting place of
all lxc's on the machine).<br>
<br>
Use of Linux "cp" to move the unpacked lxc to the final
destination fails. <br>
<br>
Obviously "cp" doesn't have a "--numeric owner" option.<br>
<br>
Also, I observed that on my system I carried out all these steps
as a sudo-er.<br>
</div>
<br>
Best regards,<br>
Masood<br>
<br>
<div class="gmail_quote">
On Tue, Feb 26, 2013 at 11:34 PM, Miroslav Lednicky <span dir="ltr"><<a href="mailto:miroslav.lednicky@fnusa.cz" target="_blank">miroslav.lednicky@fnusa.cz</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>Hello,<br>
<br>
You must use tar with option --numeric-owner<br>
<br>
for example:<br>
<br>
tar --numeric-owner -czvf lxc.tgz /lxc/my_lxc<br>
<br>
Best regards,<br>
<br>
Miroslav.<br>
<br>
Dne 27.2.2013 00:38, Masood Mortazavi napsal(a):<br>
</div>
<div>
<div>> What is the best way to move an lxc
container form one host to another?<br>
> On ubuntu, a simple tar of the container files, move
and copy, doesn't<br>
> seem to work properly or reconstitute a container on
the target host<br>
> with proper settings.<br>
> Man pages give very little information on this. (I
can speculate that<br>
> one way is to create a specific template. However, it
would be nice to<br>
> have an easier way / trick.)<br>
> - m.<br>
><br>
><br>
</div>
</div>
<div>
<div>>
------------------------------------------------------------------------------<br>
> Everyone hates slow websites. So do we.<br>
> Make your web apps faster with AppDynamics<br>
> Download AppDynamics Lite for free today:<br>
> <a href="http://p.sf.net/sfu/appdyn_d2d_feb" target="_blank">http://p.sf.net/sfu/appdyn_d2d_feb</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Lxc-users mailing list<br>
> <a href="mailto:Lxc-users@lists.sourceforge.net" target="_blank">Lxc-users@lists.sourceforge.net</a><br>
> <a href="https://lists.sourceforge.net/lists/listinfo/lxc-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/lxc-users</a><br>
><br>
<br>
--<br>
Miroslav Lednický,<br>
Fakultní nemocnice u sv. Anny v Brně<br>
<br>
------------------------------------------------------------------------------<br>
Everyone hates slow websites. So do we.<br>
Make your web apps faster with AppDynamics<br>
Download AppDynamics Lite for free today:<br>
<a href="http://p.sf.net/sfu/appdyn_d2d_feb" target="_blank">http://p.sf.net/sfu/appdyn_d2d_feb</a><br>
_______________________________________________<br>
Lxc-users mailing list<br>
<a href="mailto:Lxc-users@lists.sourceforge.net" target="_blank">Lxc-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/lxc-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/lxc-users</a><br>
</div>
</div>
</blockquote>
</div>
<br>
<br>
<fieldset></fieldset>
<br>
<pre>------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
<a href="http://p.sf.net/sfu/appdyn_d2d_feb" target="_blank">http://p.sf.net/sfu/appdyn_d2d_feb</a></pre>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Lxc-users mailing list
<a href="mailto:Lxc-users@lists.sourceforge.net" target="_blank">Lxc-users@lists.sourceforge.net</a>
<a href="https://lists.sourceforge.net/lists/listinfo/lxc-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/lxc-users</a>
</pre>
</blockquote>
<br>
</div></div></div>
<br>------------------------------------------------------------------------------<br>
Everyone hates slow websites. So do we.<br>
Make your web apps faster with AppDynamics<br>
Download AppDynamics Lite for free today:<br>
<a href="http://p.sf.net/sfu/appdyn_d2d_feb" target="_blank">http://p.sf.net/sfu/appdyn_d2d_feb</a><br>_______________________________________________<br>
Lxc-users mailing list<br>
<a href="mailto:Lxc-users@lists.sourceforge.net">Lxc-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/lxc-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/lxc-users</a><br>
<br></blockquote></div><br>