btrfs-send has the "-p" parameter to provide the previous snapshot for an incremental backup.
Let's say I have snap1, snap2, snap3 and snap4: then I do a rollback to snap2. If I call btrfs-send now, what's the previous snap? snap1 or snap4?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
Straight from the BTRFS FAQ:
It's easiest to understand if you look at what receive does. Receive takes a stream of instructions, creates a new subvolume, and uses the instructions to modify that subvolume until it looks like the one being sent.
When you use -p, the receiver will take a snapshot of the corresponding subvol, and then use the send stream to modify it.
Generally you can choose any of the subvolumes as the parent. The best parent though would be the one with the fewest differences to the snapshot you want to sent, so in your example this would be
btrfs send/receive to work reliably though you should consider these conditions:
btrfs property set <subvol> ro true)
You can also omit specifying a parent explicitly and only list subvolumes as clone sources with the
-c flag. These also need to exist on the receiving side but
btrfs send will try and select the most appropriate parent subvolume for you.