Question
Is there a way to synchronize two BTRFS snapshots manually on different disks and mark them as identical (set the parent/child relationship) reliably?
Problem
I was synchronizing my snapshots with my external disk. Naturally, I'm taking advantage of btrfs send -p $PARENT $CURRENT which greatly reduces the amount of data needed to be sent over the wire. To be able to send the snapshot by only using the diff, the PARENT snapshot must exist on both disks.
I mistakenly deleted all of my old snapshots on my laptop so all common snapshots are gone. Since there is no common point, I have to send entire snapshot for the first time, which is about 800GB. rsync says there are only 100MB of difference between my oldest snapshot on my laptop and the newest snapshot on the external disk. That's why I don't want to send whole 800GB again instead of sending 100MB.
Idea
I thought I could
- create a rw snapshot of oldest snapshot on the external disk (name this
foo), - use
rsyncto synchronizefoowith the source snapshot on the laptop, - then create a readonly snapshot of
fooon external disk (foo-readonly), - somehow mark
foo-readonly'sReceived UUIDwithUUIDof the source snapshot.
But, since rsync won't synchronize all files (block device files and such), would it break anything in the future if I would keep incremental snapshot technique for the rest of the transfers?
Or ignoring the possible missing files, is there any reliable way to synchronize two snapshots with rsync for this sort of scenario?
bscpvog.github.io/bscp – Bob Aug 14 '18 at 8:30--devicesparameter. – Ipor Sircer Aug 14 '18 at 9:53