On Wed, Sep 4, 2019 at 3:04 PM Swâmi Petaramesh <sw...@petaramesh.org> 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...
It is, but it's also a direct consequence of its features. Those features actually being used makes the resulting file system complicated enough that it defies being easily replicated - other than a block copy of every drive. ZFS has the same problem, but with some constraints on its features that end up softening the problem. Snapshots are only read only, they are direct children of a dataset, not independent. And therefore it's straightforward to determine their relationship, and recursive send is possible (-R replication option). Also it has a big advantage of online dedup, so while there can be unnecessary data in the send stream, it gets deduplicated on the receive side if dedup is on (which comes with a really heavy cost on speed or resources). On Btrfs, if you avoid reflinks and deduplication between subvolumes, and if you have a rigorous naming scheme, to enforce restrictions on Btrfs - you can get most of the way where you want, without having to do deduplication again on the new destination. -- Chris Murphy