Lxd backup best way?

Hi,

now i export all my containers to have a backup of the containers. i now use lxd in a btrfs subvolume instead of a loop device.

What would be the best way to backup all my containers without running to the 24 hours export limitation? I believe in the new version its 8 hours again by the way.

I dont have a second machine for lxd…

Also i must mention i read the article to for example rsync the /var/snap/lxd/common/lxd to external device. However for my running containers i have databases inside them.

And i am looking for a live backup (that everything keeps running)

Lets say i create a snapshot of /var/snap/lxd/common/lxd and rsync everything to an external hdd.

If i restore everything is it sufficient to reinstall host with lxd and rsync everyhing back to /var/snap/lxd/common/lxd ???

Out of curiosity, what is making you believe that ? It’s not what I see in LXD source code in lxc/export.go:
73 req := api.InstanceBackupsPost{
74 Name: “”,
75 ExpiresAt: time.Now().Add(24 * time.Hour),
this is code dating from LXD 3.18 at least.

I had advised you to use

lxc config set backups.compression_algorithm pigz

before exporting your big container, did you try this change ?

Yes i did.

I am lookup for a “faster way” if that is possible. The 8 hours are

That after i start a lxd export exactly 8 hours later it stop with a EOF ERROR

That’s not normal, there may be something in the log, take a look at it with something along the lines of

sudo tail /var/snap/lxd/common/lxd/logs/lxd.log -n 100

after your export failure.

Never mind

allredeay fixed.