On 04/09/19 23:04, Swâmi Petaramesh wrote: > > So the question reslly is : How could I backup a complex BTRFS volume to > another but differently (physically) organized volume keeping the > complete structure and being able to restore it preferably in a single > operation. > > If the answer is « There's no way it can be done » then it is really > badly annoying... > > ॐ > There is a python-based tool that can clone a btrfs volume by sending subvolumes to the new filesystem, one at a time. I never tried it, but it has a bunch of options, a decent readme and it's still maintained so you may ask its developer too about your case.
https://github.com/mwilck/btrfs-clone Personally I've never used large arrays nor RAID5/6 on Btrfs so I've just been cloning partitions of UNMOUNTED Btrfs raids with pv (which is basically a "cat" that shows progress bars and such, dd isn't doing anything special, and if you set the wrong block size it will take ages). One disk after another, as long as the partition fits it will work fine. Can clone all disks at the same time, as long as they are unmounted. If you are copying GPT disks and the target disk isn't 100% the same size, the backup GPT partition table at the end of the drive will be in the wrong place so you will need to fix that with fdisk (should be just "sudo fdisk /dev/sdX" and then you aknowledge the issue about the missing GPT table at the end of the device, and then "write changes to disk") or gdisk (that has a specific command to rebuild the backup GPT table in the advanced menu). -Alberto