Backup without mediators

Hey, everyone!
As I see, lxc export at first create backup at /var/snap/lxd/common/lxd/backups/instances/<VM/LXC_NAME>/backup<#>, only then transfer it to the target dir.
Big VMs/LXCs that use much space are unexportable with mediator dirs, until I enlarge a pool with more vdevs. Also, backuping directly to the target dir will save time.
Can I force lxc export to export directly to the target dir, to save time?

Data in my VMs and LXCs is not compressible, so compression is waste of time and CPU resources in my case. I started to use --compression none, am I right?

I just noticed, that after installing LXD via Snap in Ubuntu 20.04, there is no manual for LXD/LXC. man lxc returns No manual entry for lxc.

You can specify a custom volume for the temporary backups to go into, see Issues with export ('io: read/write on closed pipe') - #5 by tomp

But as LXD is a server it cannot create the backup directly on the destination specified by the client, and when adding files to the tarball we need to know the size up front and that isn’t available for optimized exports. Additionally we don’t want to end up buffering the tarball in memory while its streamed out.

Thank you, @tomp!

1 Like