Backup LXD with ZFS

Hi!

I wanted to do a full backup but realized I was using ZFS for my storage pools, and I saw in a video from LXD that it will require extra attention. What would be the way to do so? Quite new to ZFS, not sure if that was the right choice :smiley:

Hopefully people can help me out

As of now I copy the whole /var/snap/lxd/common/lxd to a /tmp location so I can safely tarball the whole directory with getting in between file changes. This does include (I think) the zfs images, tho I think I should ignore them and handle them differently, right?

You could just replicate the zpool. Then to restore on another system you import into another zpool with the same name, then use incus admin recover

Right, in that case I should go with dir or something else, tho one ZFS already has some data on it, is that some how migratable? Because running another system is gonna be hard

Sorry, I don’t understand the problem.

If your storage pool is already in zfs, then use a tool like syncoid or zrepl to replicate it to another machine (and you can then do incremental updates)

If that zpool contains data other than incus, then just backup the datasets of interest.

If this is a disaster-recovery type situation, then as long as the target machine has the same named storage pool, and I believe the datasets need to be at the same paths, then incus admin recover will recreate the database using files stored within the filesystem.

If that’s not what you’re looking for, then there’s always incus export and incus import. With that, you can restore individual instances into any pool type you like.

If the target machine is running incus then there’s incus copy, and if you’re going zfs to zfs then this can do incremental updates too (using --refresh)

Hi,

Well the VM’s running there are using disk space over 1TB, I do not have funds to add another server with over 1TB of storage. I’m migrating over to disk so I can tarball the full directory and SMB it to my storage block.

Thanks for the information! Will definitely do this later

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.