[lxc-users] Fastest way to copy containers

Rory Campbell-Lange rory at campbell-lange.net
Tue Jul 25 15:11:53 UTC 2017


On 25/07/17, Andrey Repin (anrdaemon at yandex.ru) 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


More information about the lxc-users mailing list