Re-establish parent child relationship after btrbk restore
- Dominant language
- Perl
- Stars
- 2.1k
- Forks
- 139
- PR merge metrics
- No merged PRs in 30d
Description
I recently lost my 16TB hard disk (`/disk1`) due to a mechanical failure. Thankfully I had a btrbk set up to create backups to my second disk (`/disk2`). This is how my `btrbk.conf` looks
```
transaction_log /var/log/btrbk.log
snapshot_dir snapshots
snapshot_preserve_min 24h
snapshot_preserve 7d 4w *m
target_preserve_min 24h
target_preserve 7d 4w *m
volume /disk1
subvolume photos
target send-receive /disk2/photos
subvolume media
target send-receive /disk2/media
```
In order to restore the backups, I copied everything using `btrfs send /disk2/photos/photos.20240814 | btrfs receive /disk1` and then used `btrfs subvolume snapshot /disk1/photos.20240814 /disk1/phtotos` and then finally `btrfs sub volume delete /disk1/photos.20240814` to restore my backups.
Everything was fine so far but I wanted my backups of (new) `/disk1` to continue building on top of those already in `/disk2`.
Now the issue is that the new UUIDs of the subvolumes of `/disk1` are not the matching the Parent UUID of the backups in `/disk2`, therefore my backups aren't incremental anymore. They are copied entirely separately.
I get the following warning in my `btrbk`: `No common parent subvolume present, creating full backup...`
Is there any way to somehow restore the parent child relationship for btrbk or my incremental backups to work again?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the btrbk.conf example and reproduce the restore using btrfs send, btrfs receive, and subvolume snapshot on /disk1 and /disk2. Inspect how btrbk compares subvolume UUIDs and Parent UUIDs when it reports “No common parent subvolume present.” Done means restored backups can continue incrementally rather than being copied as full backups.
Written by the indexing model from the issue text.
Assessment
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100