It's time to take advantage of restic backups! Help!

  • Restic version: 0.13.1
  • OS: Rocky Linux 9.5

Hello everyone. I’ve been backing up my system since I got it a couple of months ago. Now I’m facing some abrupt shutdown issues, and I wanted to ensure that they are caused by hardware and not software. For this reason I wanted to install an alternative OS on my miniPC, and see if the problem persists.

I have some backups done via restic, saved in a nfs mount (on my NAS actually).
I’m very upset of doing the “wrong thing”, so may you please guide me on “doing the right stuff”?

My current plan is to:

  1. Backup my fstab to restore the nfs link
  2. Install the new OS, replacing the old one
  3. Mount the nfs mount, where both the backup configurations and the backups themselves are stored
  4. restore the restic backups
  5. enable the restic schedules again

Have I missed anything?

Thanks!

Your plan looks OK in principle.

One thing you should consider is to stop using very old (yours is from 2022) restic version. Do not rely on your OS repository where nobody bothers to keep it updated (or use linux repo where things are kept up to date). restic is single binary you can save and use from any location - so download the latest one from restic site and enjoy.

Just a sidenote (not sure how skilled you are with GNU/Linux): maybe you can find out what the cause for the crashes is first (logs)? And also maybe try a different (older/LTS) kernel. Depending on the hardware you have this might mitigate the problem.

@elegos
As I read this you use restic to backup your entire Rocky Linux system, and want to restore the Rocky Linux root backup from nfs while you are logged in and running the “new OS” ?

To me that sounds like asking for problems. Concerns:

  1. will restic properly backup an entire system whilst running it? files may change between start and end of the backup and can leave the OS backup in an inconsistent state.
  2. when you restore the backup while running the new OS, I envision you block/crash your OS which would interrupt the restore.

For this scenario I would use software made for system wide (baremetal) backup like Rescuezilla(Rz)/Clonezilla(Cz).
Personally I have Rz/Cz on a ventoy disk together with other toole like gparted and half a dozen of linux live OS to play with. Rz/Cz can also backup to nfs via the network.

In case I have misread “system” and you just back up some personal data like photos, email etc, then what you want to do should work. In that case my only advice would be to make really sure you know you have backed up all important items (data/configurations/…). Once you install “new OS” you can only restore whatever you ever backed up with restic 8-).

Last, because I have actually mentioned it already, you can also go KISS and try out “new OS” from a live USB. Advantage: it is simple, does not overwrite your existing OS and is usually good enough for test purposes. And most liveUSB will recognize your storage so you can access your documents if needed.

Sorry for the somewhat long reply; but better to be safe then sorry!

@nicnab I think in the end it might be a power drain issue, as I tried installing Windows (the support asked me some registry info - meh), and it shutdown during the starting of the configuration of the OS (peak CPU usage?). Also I digged into boot logs (enabled persistend logs etc), but found no fault evidence, but the fact that boots were not shutting down gracefully (2 boots in a row without a shutdown event).

@GuitarBilly nope, I’ve backed up a couple of docker services, shutting down them before the backup :wink: - so restore should be no problem

Btw it’s a Boosgame miniPC (P4 Pro) with relative-but-not-so new hardware, so it shouldn’t be a problem (Ryzen 7 5700U with 32 GB of DDR4 RAM and 1 TB of M.2 NVMe gen4 drive). The BIOS is a little bit funky (and it confuses the Fedora Server installation, for instance), but the kernel is the same I used since a month and started acting strange only lately.

1 Like