As far as I know, LXD does not support incremental copies - either local or 
remote (“error: Container ‘blahblah2' already exists”).

The question I posed earlier was how to copy a container from one LXD server to 
another.  We need to migrate containers to different hosts so we can do 
maintenance on the container servers, and we have lots of containers to move.  
If we are using BTRFS, “lxc copy” will use btrfs send/receive which is very 
slow (~20MB/sec over a 10G network).  

The quick work-around is to create a shell container on the remote server (lxd 
init server:blablah2) then use rsync to copy the data.  It works much faster 
than btrfs send/receive.


-Ron





 
On Jul 25, 2017, at 11:11 AM, Rory Campbell-Lange <[email protected]> 
wrote:

On 25/07/17, Andrey Repin ([email protected]) wrote:
>> I am trying to copy sites from one LXD to another - both running BTRFS.
>> The normal “lxc copy” command uses btrfs send/receive which is terribly
>> slow.
> 
> btrfs send/receive is fast, when you send incremental copies of partitions.
> And of course it will be slower than rsync, since it works on a different
> level.

Are you copying to a btrfs seed image? In other words, if you made the
container from a base image, and then have snapshotted that base image
again as a copy target, the send/receive process should be very fast.

On the other hand for an initial image, it would be better to do a btrfs
snapshot assuming that the images are on the same volume. That should be
basically instantaneous.

Rory
_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to