>> Fsacrhiver has the problem with btrfs filesystem that we can only backup/restore one subvolume for each partition, the rest of subvolumes are copied as regular directories..Limitations
There are several limitations anyway: it cannot preserve filesystem attributes that are very specific. For instance, if you create a snapshot in a btrfs volume (the new-generation file system for linux), FSArchiver won’t know anything about that, and it will just backup the contents seen when you mount the partition.
So here comes another interasting way to achieve a filsesytem backup for each subvolume.. We will use pipes and btrfs send/receive functions.
**To prevent this error (ERROR: rename-> failed...) in restoring process, its necessary to use same version of btrf-progs and kernel in backup/restore process.
http://forums.debian.net/viewtopic.php? ... 56#p700465
0- Install PV for following progress backup and lzop for a very fast backup compression.
sudo apt install split pv lzop
1- Mount our system root subvolume as a only read snapshot.
sudo mount -t btrfs -o subvol=@root /dev/sda2 /mnt
sudo btrfs subvolume create /mnt /path/to/snapshot
sudo btrfs property set -ts /path/to/snapshot ro false (we might need to set ro flag)
2- Blackup filesytem to an another partition/device by using "btrfs send" + lzop compressor
sudo btrfs send /.snapshots/3/snapshot/ |pv -s 14G| split -b 1000M --filter 'lzop -1 > "$FILE.lzo"'
pv -s 14G : Show progress for a stimated subvolume size of 14Gb, we will query that information previously
split -b 1000M --filter 'lzop -1 > "$FILE.lzo"': Split it in 1Gb size chunks and then compress them with lzop to a fastest rate speed.
3- Restoring filesystem backup.:
3.1 We create an empty subvolume for restoring btrfs filesystem backup
sudo mount -t btrfs -o subvolid=0 /dev/sda2 /mnt
sudo mv /mnt/@root /mnt/@root.delete
sudo btrfs subvolume create /mnt/@root
3.2 We restore lzop chunk files, with "btrfs receive" in the new root subvolume created.
cat xa* | lzop -dN --ignore-warn | sudo btrfs receive -v --max-errors 0 /mnt/@root
4. Reboot and delete old subvolume system.
sudo mount -t btrfs -o subvolid=0 /dev/sda2 /mnt
sudo btrfs subvolume delete /mnt/@root.delete
And that sould make it, try first this method with test data subvolumes to verify everithing works well.