I’m looking for advice or step-by-step guidance on performing a full disk backup using Restic while in Hetzner Cloud Rescue Mode. My main goal is to have a backup that can be easily restored without too much effort.
Has anyone successfully done this? If so, could you share the steps or tips to make the process smooth and reliable?
Any detailed follow-up steps would be highly appreciated!
I haven’t personally done that yet but the basic idea should work. I just checked if you can copy the restic binary to the rescue system’s /usr/bin folder and that works. So all you should have to do is use one of restic’s “–stdin” options to dd the device you want to backup to restic (probably /dev/sda1) and then put that in a repository of your choice.
The only thing I’m not too sure about is whether that is actually very practical as you have to take down your server on every backup and you have to read the whole device on every backup. Deduplication should make snapshots fairly small but I’m also not too optimistic about speed in this setup.
Why not just dd/gz the image to a backup location from time to time and make a backup of the actual data within the machine using restic?
If this is a Linux system and you use rescue mode, you might also consider just backing up the whole file system of the machine in question. After a full restore you’ll have to rebuild your grub setup, very likely in a chroot jail. That should be reasonably fast. But I agree, it is not very practical, you have to do lots of manual steps.
Small update for @wCORS : Out of academic interest I just tested dd’ing the rescue disk hdd to a local computer and directly backing it up to restic. It does seem to work but I didn’t want to finish the whole 20 gigs.
thanks @nicnab great job! i will check that; What command will you do to restore the entire /dev/sda? just to know what exact command will do the restore, and it doesn’t require GRUB update?
Sorry but, as I said, I stopped there. But with the command above, you should be able to find out and test the restore.
I’m guessing that if you have the same machine to restore to, there should be no grub trouble. That’s why I went for the whole /dev/sda device. But maybe there are folks here with more knowledge about these things? And, of course, only a test will bring certainty.
That is my way too. All machines are documented so they can be reinstalled at any time so all I need is a backup of the data. Everything else keeps me from sleeping well.