How to restore Timeshift backup to a new volume?

I had an EndeavourOS btrfs installation, but my fs got corrupted, so I needed to recreate it.

I created the system backup using Timeshift in rsync mode, and /home backup via rsync -av manually, reinstalled EOS on this drive and restored both backups.

After that I could not boot because it could not find the new volumes by UUID (hibernation device 'UUID=...' not found, /new_root: can't find UUID ...). So I updated them in /etc/fstab and /etc/default/grub, chrooted and grub-mkconfig -o /boot/grub/grub.cfg, but still getting the same errors, even though they seem to show the current UUIDs.

lsblk -f
NAME        FSTYPE      FSVER            LABEL       UUID                                 
nvme1n1                                                                                                  
├─nvme1n1p1 vfat        FAT32                        42EC-3490                                           
├─nvme1n1p2 btrfs                                    ee578df1-6236-4eea-b6e5-62579060b349                
└─nvme1n1p3 swap        1                swap        4d31088c-9a64-43de-8864-9fa9ef0f7aea                

You might need to regenerate the initrams after making that change.

arch-chroot in and run mkinitcpio -P

I think I did this too already. :thinking:

How is it possible that it can’t find UUIDs that exist? At least in lsblk from the LiveCD. (can’t check it in the emergency shell, my keyboard doesn’t work there)

The bootloader is able to load the root volume but the initram can’t.

My best guess would be something wrong with the initramfs. Have you tried booting the fallback entry?

Oh, mkinitcpio -P fixed it, I guess I did it somehow wrong before.

Now it boots and the system things are restored fine, but my home is missing. Looks like @home is not mounted during @ mounting.

When I was restoring it, I simply mounted the disk via the file manager in the EOS LiveCD and rsync to ......../@home. Is it wrong?
I checked via the LiveCD again, and indeed the /home of the mounted disk is empty, while my files are present in @home.

But if I mount via

sudo mount -o subvol=@ /dev/nvme1n1p2 /mnt
sudo mount -o subvol=@home /dev/nvme1n1p2 /mnt/home

then everything is correct in /mnt/home. So I thought the same is supposed to happen when booting.

I don’t see any mounting errors in journal.

fstab:

UUID=ee578df1-6236-4eea-b6e5-62579060b349	/	btrfs	subvol=/@,defaults,noatime,autodefrag,compress=zstd	0	0
UUID=4d31088c-9a64-43de-8864-9fa9ef0f7aea	swap	swap	defaults,noatime	0	0

That isn’t automatic.

All your subvolumes should have separate entries in /etc/fstab

hm, but why it worked before? This fstab was working fine before the reinstall.

I thought I heard that nested subvolumes like this are mounted automatically. :thinking:

I don’t think your /etc/fstab looked like that. Do you still have the original from before you started making changes?

@home isn’t a nested subvolume.

A nested subvolume would be something like @/home

hm, weird, looks like they are indeed present in the timeshift backup, I doubt that I deleted all that. :thinking:

So the correct fstab is

UUID=42EC-3490                            /boot/efi      vfat    umask=0077 0 2
UUID=ee578df1-6236-4eea-b6e5-62579060b349 /              btrfs   subvol=/@,defaults,noatime,autodefrag,compress=zstd 0 0
UUID=ee578df1-6236-4eea-b6e5-62579060b349 /home          btrfs   subvol=/@home,defaults,noatime,autodefrag,compress=zstd 0 0
UUID=ee578df1-6236-4eea-b6e5-62579060b349 /var/cache     btrfs   subvol=/@cache,defaults,noatime,autodefrag,compress=zstd 0 0
UUID=ee578df1-6236-4eea-b6e5-62579060b349 /var/log       btrfs   subvol=/@log,defaults,noatime,autodefrag,compress=zstd 0 0
UUID=4d31088c-9a64-43de-8864-9fa9ef0f7aea swap           swap    defaults,noatime 0 0

now everything is restored :tada:

1 Like