Backup arm64 lxd containers on an x64 server

Hello,

My raspberry pi4 is now running few containers using the ZFS filesystem (tank/lxd dataset). I want to backup these containers to my x64 server. These containers ofcourse cannot run on the x64 server since they are binary incompatible. My intention is to simply store them incase the raspberry does or something.

If i simply zfs send the ‘tank/lxd’ and its children every night to the x64 server, is that sufficient for backup?

Hi,
If you are using snap on the pi4 then you should backup the entire directory which is /var/snap/lxd/common/lxd if I remember correctly. And need dump of the lxd like this.
lxd init --dump > dump_of_lxd.yaml
Thanks.

You can also setup a backup LXD instance and then use:

lxc remote add <target server> <target server address>
lxc copy <source instance> <target server>:<target instance> --refresh

or to produce a backup file:

lxc export <instance> <file name> --optimized-storage

Hi Thomas,
sorry that I reply to this old post but I’m running into the same problem. I do my backups with zrep but on my orangepi5 host I’m using btrfs and wanted to send the instances to an x64 host (using zfs).

I tried what you suggested but it does not work:

lxc remote add <target server> <target server address>
lxc copy <source instance> <target server>:<target instance> --refresh
ubuntu@ubuntu:~$ lxc copy test backup:test --refresh
Error: Failed instance creation: Failed creating instance record: Requested architecture isn't supported by this host

Is there another way of doing it? I already copy btrfs-volumes (only storage) with this command lxc storage volume copy btrfs-stor/ncng backup:default/ncng-storage --refresh (this works)
But i don’t know if it works with an instance.

Thank you in advance,
Nico