Recovering BTRFS snapshots

Oh, I see.

I fixed the part of my post:


Yes

That looks like you copied the system-subvolume @ from the external disk to the original @. This is bad.

You should separate two system-subvolumes @

1 Like

from an external backup?

Yeah, Timeshift with Btrfs is quite limited and inflexible.
Its alternative is btrfs-assistant with snapper as the dependency, but it is well suited for slightly advanced users who needs some abilities: Checksum and extremely fast creation of snapshots in less than 1 second in the running system.

1 Like

/btrfs/@ /btrfs/@_backup

There was no /btrfs/@ - I thought we created that, it’s empty before importing the backup.

I guess I’m gonna do a reboot to see if it’s still working…

Set Timeshift to rsync, backup to /mnt/T3 first… but it looks like a long haul, with btrfs/@/btrfs/@/var/lib/flatpak/repo... copying now…

Ok, I gave up on doing the rsync backup - after 20 minutes it still only made like 5% progress with ??? eta.

The reason I switched to BTRFS is because Timeshift fails on restoring backups when they are too big if they are on another drive - when you go to a million or more files, just the parsing is a nightmare.

Now, from this list:

ID 256 gen 414 top level 5 path @
ID 257 gen 414 top level 5 path @home
ID 258 gen 407 top level 5 path @cache
ID 259 gen 414 top level 5 path @log
ID 260 gen 194 top level 5 path @swap
ID 262 gen 387 top level 5 path timeshift-btrfs/snapshots/2024-01-21_17-59-22/@
ID 264 gen 387 top level 5 path timeshift-btrfs/snapshots/2024-01-21_19-00-01/@
ID 265 gen 388 top level 5 path timeshift-btrfs/snapshots/2024-01-21_19-00-01/@home
ID 266 gen 305 top level 256 path btrfs/@

I don’t understand the paths too well, but the first ID 256 is our default running system, right?

Then /btrfs/@ is our image to put in there? or we should set the system now to mount not /btrfs/@ instead of /@ ?

I thought you reinstalled the new Btrfs system? In the new system, some new subvolumes @ and @home are created automatically.

Check `ls -al /btrfs` to show all subvolumes within your system.

The @ is not located in /btrfs

The list shows ‘@’ and ‘/btrfs/@’ separate folders.

Did you mount /btrfs ?

Yes, mounted…
I’ll run that again just to be sure.

sudo mount -t btrfs -o subvol=/ /dev/sda2 /btrfs/      

[sudo] password for ben: 

Can you share the output: ls -al /btrfs

For example:

$ ls -al /btrfs                                                                                                                                                          
total 16
drwxr-xr-x 1 root root  32 11. Sep 14:08 .
drwxr-xr-x 1 root root 188 20. Jan 19:26 ..
drwxr-xr-x 1 root root 188 20. Jan 19:26 @
drwxr-xr-x 1 root root 120 27. Jan 2023  @cache
drwxr-xr-x 1 root root   8 11. Sep 14:08 @home
drwxr-xr-x 1 root root 396 21. Jan 14:31 @log

1 Like
# mkdir /btrfs/sys_backup
# btrfs send /mnt/sys-back/@ | btrfs receive /btrfs/sys_backup/

I’m going to do this, made new directory /sys_backup…
Will delete and send the volume again.

But now I cannot delete the /btrfs/@ volume imported…

Ok, now sudo rm -rfv /btrfs - massive 'removed /btrfs/timeshift-btrfs/snapshots/`… it’s crazy.

I guess I deleted the system again?

Please (!) dont skip this step

I guess so :wink:

Why would you want ?
You only need to make it writable.
Then correct boot-infos like fstab and grub.cfg

I thought I just imported that one… wow.

Well, now I’m reinstalling :frowning: paying the price for stupidity… I can’t tell the difference between a snapshot and the system!

The system is a snapshot == subvolume with name @
If you mount it to /btrfs , its path is /btrfs/@
But you need to use ls in this case to see(understand) what is in the path.

Ok.

I’m keeping notes too, so hopefully a clean start might be the last one. Restarting to fresh install now.

Why?

After restoring the snapshot, the installed system will cease to exist. It is replaced by the system backup (from the Snapshot).

The only thing that remains from the installed system is the subvolume @home, which you backed up separately.

P.S. (you need to restore using a live manjaro. you cant do this in the running system)

Because deleting /btrfs folder corrupted the system and it wouldn’t reboot… which is what confused me as I just created that.

The system needs not to be bootable !
Just use your live manjaro to restore the backup.

From live:

  • mkdir /btrfs
  • mount your system disk to /btrfs
  • show ls from /btrfs to us

Then wait ! (You take to big steps. This is more trouble. Because then you get confused. Please take small steps together with me. And we will be fine in no time.)


Ok, after this will reboot to live.

Sadly I have not much time left before bed - but can continue in the morning… I guess everyone else will be asleep in another 9 hours time…

But yes, I’m gonna take it easier because restoring this snapshot will save me a good bit of time, I think most of the week to get things back working right again.

Can you say at what time ? I will try to be there (if possible in german timezone. + i have to work on monday :frowning: )