I'm about to re-configure my home server from scratch and am wondering what would be the best strategy to backup my LXD containers. Meanwhile I am running Ubuntu 20.04 LTS and have some services configured to run as LXD/LXC containers. For example:
- container "cloudserv" running seafile
- container "webservice" running nginx and MariaDB
These two containers are located on my SSD with btrfs filesystem. For data storage I am using an array of disks (also with BTRFS), where I have created another LXC storage pool with a storage volume which is the attached to the seafile container to hold all the data. The layout is something like this:
SSD
- BTRFS Filsystem
- Storage Pool "Default"
- container "cloudserv"
- container "webservice"
- images
- Storage Pool "Default"
HDDs
- BTRFS Filesystem
- Storage Pool "DataPool1"
- custom storage volume "seafile-data" --> attached to container "cloudserv"
- Storage Pool "DataPool1"
By using BTRFS I was hoping to be able to make use of BTRFS snapshots and send and receive tools to easily transfer containers and storage volumes as subvolumes e.g. to a RasPi with a BTRFS volume attached. But reading e.g. LXD Manual or How to backup and restore LXD containers I have the impression that I always have to create a tarball to backup an instance which can then be transferred. This would imply that I actually loose some of BTRFS attractive features like being able to send/receive the subvolumes/snapshots and doing incremental backups of my LXC instances and data.
Do I miss anything? Can anybody give some hints for appropriate backup workflow for LXD/LXC with BTRFS?