Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-establish parent child relationship after btrbk restore #598

Open
babyygemperor opened this issue Aug 14, 2024 · 1 comment
Open

Re-establish parent child relationship after btrbk restore #598

babyygemperor opened this issue Aug 14, 2024 · 1 comment

Comments

@babyygemperor
Copy link

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?

@mipro98
Copy link

mipro98 commented Sep 10, 2024

and then finally btrfs sub volume delete /disk1/photos.20240814

I think that was the mistake. If you read "Restoring Backups", it is advised to keep the copied subvolume until at least one new backup has been created:

Make sure to keep data.20150101 subvolumes on both disks at least until you created a new backup using btrbk, in order to keep the incremental chain alive.

This way, btrbk can detect a new common parent (the one you restored) on both the target and local disk and bases its incremental backup on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants