On 02.11.2016 15:23, René Bühlmann wrote: > Origin: S2 S3 > > USB: S1 S2 > > SSH: S1 > > Transferring S3 to USB is no problem as S2 is on both btrfs drives. But > how can I transfer S3 to SSH?
If I understand correctly how send / receive works, for the incremental receive to work there must be a subvolume on the destination which has "received uuid" equal to the uuid of parent choosen for the incremental send. > I tried to transfer... > > 1. S3 from Origin to SSH -> does not work as there is no common snapshot. > > 2. S2 from USB to SSH -> did not work. The "received uuid" of S1 on SSH is the uuid S1 had on Origin. The uuid of S1 on USB is different, so when choosen as parent for the incremental send it doesn't match. > 3. S1 from USB to Origin (such that there is a common snapshot with SSH) > -> did not work. There are no previously received subvolumes on Origin at all, so it isn't going to work. > Is it correct that 1. would work if a common snapshot is present on > Origin and SSH? If there was a snapshot received from Origin that still exists on Origin, then yes, you could use it as a clone source for incremental send. > Is it expected that 2. and 3. do not work? > > Is there some other way to achieve it? I doubt you can do it without some "hacking" to fool btrfs receive. You would need a tool that can issue BTRFS_IOC_SET_RECEIVED_SUBVOL ioctl to change the received uuid. Then you could: 1. Change received uuid of S1 on SSH to match S1 uuid on USB. 2. Send incremental S1-S2 from USB to SSH. 3. Change received uuid of S2 on SSH to match S2 on Origin. 4. Send incremental S2-S3 from Origin to SSH. Regards -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html