On Fri, Feb 12, 2016 at 8:28 PM, Marc MERLIN <[email protected]> wrote: > btrfs send lets you keep COW blocks within a subvolume. > But if I have lots of backups where subvolumes have shared data, and I need > to migrate this to a new filesystem, is there a decent way? > > I know I can btrfs device add new drive as raid1, but I'm trying to migrate > off an old filesystem that likely wasn't created well. Is there a way to do > that? > I guess ideally I'd need btrfs send on a volume level, not subvolume level.
btrfs send -e should accept a long list of subvolumes, or if you have good bashfoo maybe you can have bash hand over the list in the proper subvolume order. This effectively acts like a recursive send. The problem is that right now it's not working. Even if I use fully qualified paths, starting with the top level volume (id5) being mounted, it doesn't work. But that's the only way I know of to do what you want. Otherwise it's with -p and it's pretty tedious to do manually but again, good bashfoo and you can probably automate a loop. Send SV1 manually, then -p SV1 SV2 then -p SV2 SV3 then -p SV3 SV4, and so on. I'm pretty sure -e does that for you but I haven't been able to test it because I can't get it to work. -- Chris Murphy -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
