Christoph Anton Mitterer <calestyo@xxxxxxxxxxxx> schrieb: > Hey. > > I've seen that this has been asked some times before, and there are > stackoverflow/etc. questions on that, but none with a really good > answer. > > How can I best copy one btrfs filesystem (with snapshots and subvolumes) > into another, especially with keeping the CoW/reflink status of all > files? > And ideally incrementally upgrade it later (again with all > snapshots/subvols, and again not loosing the shared blocks between these > files). > > send/receive apparently also works for just one subvolume,... and > documentation is quite sparse :-/ You could simply "btrfs device add" the new device, then "btrfs device del" the old device... It won't create a 1:1 clone, if that is your intention. But it will migrate all your data over to the new device (even a bigger/smaller one), keeping shared extents (CoW/reflink status), generation numbers, file system uid, label, each subvolume, etc... And it can be done while the system is running. It looks like this way fulfills all your requirements. That same way you can later incrementally update it again. -- Replies to list only preferred. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
