I have a couple of backup files created with BTRFS send. I can restore the subvolume with those files. However I cannot keep using them for incremental backups.
Here is an example:
# Create first snapshot
btrfs subvolume snapshot -r <original_subvol> <snapshot_1>
# Write some stuff to <original_subvol>
btrfs subvolume snapshot -r <original_subvol> <snapshot_2>
# Create the backup files
btrfs send -f <snapshot_file_1> <snapshot_1>
btrfs send -f <snapshot_file_2> -p <snapshot_1> <snapshot_2>
# Suppose you lost <original_subvol> and you restore to a brand new filesystem
btrfs receive -f <snapshot_file_1> <dest>
btrfs receive -f <snapshot_file_2> <dest>
# Create a write snapshot from the last restored snapshop
btrfs snapshot <restore_snapshot_2> <restore_subvol>
# Write some stuff to <restore_subvol> and do an incremental backup
btrfs snapshot -r <snapshot_3> <restore_subvol>
btrfs send -f <snapshot_file_3> -p <restore_snapshot_2> <restore_subvol>
# Suppose you lost <restore_subvol> (again !) and you restore to a brand new filesystem
btrfs receive -f <snapshot_file_1> <dest>
btrfs receive -f <snapshot_file_2> <dest>
btrfs receive -f <snapshot_file_3> <dest>
=> ERROR: could not find parent subvolume
What I am doing wrong ?