Restic restore full system back

Hello everybody,
I have backup jobs running on my systems via the following command line:
restic backup --one-file-system /

This works fine and it helped a me a lot in the past, when I just needed a single file. I could dump the file or even restore a whole directory. Everything worked fine.

Today one of my servers crashed, so I thought:“Hey I’ts a nice moment to try a full system restore with restic”.

And yeah… I thought it will be nice, but it wasn’t. So I boot into a rescue ISO, downloaded restic and configured it correctly. I could access the repository and everything just worked out of the box. (That was the nice part). Now the bad part starts.

First, I have been stupid, so I just tried restoring over my old installation. I’ve mounted it to /mnt and did:

restic restore latest --target /mnt/

After a reboot, It didn’t work. Of course.

So I gave it another try. This time I made sure to delete my old system in /mnt. So I did a rm -rf /mnt/*
and then I tried a restic restore latest --target /mnt/. This was better, but everything I got when booting into it was a initramfs error. I tried reinstalling grub, but this didn’t help at all. My guess right now is, that I should have played with dracut and generating an initramfs, but I just went the easy way now and rebuild the VM with a fedora 31 (the crash occured during fedora31/32 upgrade).

So my questions are:

  1. what did I do wrong?
  2. do you have any documentation for a full system restore?
  3. Why was the initramfs missing? Do I need to backup /boot separately?
  4. Do you have any tipps for a future incident?

I did exactly a restore like this and posted it here: Bare metal restore from restic repo: worked fine!

So full system restores should work well. Not sure at the moment what could be the problem. I see you are using one-file-system. Did your system really reside only on one partition?