Today I wanted to try a full “bare metal restore” from my restic backup. I wanted to see how it works so that I did it at least one time when there is a real disaster.
I chose a smal webserver of mine with about 20GB of data which is backed up with restic each night to a sftp repo. The backup covers everything ("/"), just excluding proc, sys, tmp and var/tmp.
What I did:
created a VM which is big enough at some cloud provider
booted it with the provided resuce system
downloaded restic to /usr/local/bin, checked the repo with restic … snapshots -> worked
mounted the harddisk at /mnt/restore and did restic restore to that target.
did a chroot to /mnt/restore, grub2-install, grub2-mkconfig, dracut -f
changed fstab to the correct UUID
umount, reboot
What can I say? Beside some small problems that are not worth to mention and that have nothing to do with restic, everything was up and running. Everything took about 50 minutes.
Great! Once again thank you for this wonderful software.
Just a little pity was that although I used -v when I did restic restore, I could not see any progress during restore. Would be nice to see how far the process is.
Nice one. I don’t do full restores just because AWS bandwidth costs money, but I’ll do a local full restore at some point. I did do a restore of three random folders from AWS S3 and had no problems.
I know that backing up the whole / has a lot of overhead in storage and transfer. But it makes a disaster recovery so much easier for me since I just have to do the grub work after restore and everyhting behaves as before.
Regarding costs: AWS would be way to expensive for me. When I started playing around with restic I booked some “Storage Boxes” at Hetzner using sftp. Cheap and relieable. Now I am moving more and more over to wasabi which is full S3 compatible and does not charge bandwidth.
Same here. We moved some repositories from Hetzner to Wasabi and are really happy with the speed, reliability and pricing. The only thing I’m missing is Hetzner’s ‘auto snapshot’ feature which is a safety net incase an intruder gets access to the client and deletes the whole repository.
Thanks for the report. The process you used is almost exactly the same I use here with tar in place of restic, so I’m very glad to hear it worked – it means very little alteration to my current procedures, basically just using restic restore in place of tar should do it.
Backup laptop and perform BMR
source: Debian 12 laptop (LUKS LVM, / and /home and /var, etc. all reside on the same partition)
destination: sftp (ssh) backend
I haven’t used chroot before, but I should clarify that the laptop hard drive only contains a single partition and so does the new external hard drive. So, there shouldn’t be a need to mount /dev, etc. separately, or am I mistaken? Thanks, Michael
Without spoiling the party (I love Restic and use it everyday for my data partition), fsarchiver is a simple and easy way to save bare-metal installations (efs / etc). It saves multiple partitions in a single, compressed, encypted archive (eg sda1, sda2 etc). Once saved locally, upload to your remote, such as rsync.net, which has 7-day immutable ZFS copies of your .fsa files.