How can I restore my VPS backed up by restic/rclone?


I’ve never used restic\rcloen before, in fact, I’ve never backed up a VPS\server using any other means :wink: so I’m sorry for asking questions that might seem kinda stupid.

I installed rclone and restic. Got it working with my google drive and successfully made a backup of all “/” excluding swap, dev, tmp and other folders that I didn’t need to backup.

The problem is…I don’t get how am I supposed to restore my VPS? I mean…I can’t do it while it’s running coz files and other stuff are in use…

Thank you.

PS I’ve got Contabo VPS . I checked their VPS control panel and they got a rescure system in place

here is the description:

" The rescue system is started via the network. It will not change any files on your hard disks. You should consider using the rescue system if you cannot login to your VPS anymore or if you need to fix something that requires the operating system not to be started. Please note that for many cases, connecting via VNC might be the easier approach.

All rescue or live systems are Linux-based, so, although it is not impossible, fixing a Windows VPS with it is complicated.

We do offer three different rescue or live systems at this point in time:

SystemRescueCD (64 bit):
This is the basic rescue system based on SystemRescueCD. Typical purposes for this would be if you have to repair a bad firewall configuration or if you want to reset a password.
Debian 9 - Live:
A live version of Debian 9 which is booted into the RAM. It allows you to run Debian 9 without installing it. This might be interesting for Windows users who want to have a look at a Linux based OS without an explicit installation.
Clonezilla Live :
A live system which is perfectly qualified to backup or restore an entire hard disk or partion. A usage guide can be found on the Clonezilla website

Pressing ‘Start rescue system’ will immediatly reboot your VPS and start the rescue or live system. This process will take a few minutes. Your VPS will then be available via SSH with the IP address xxx".

Am I supposed to somehow restore my backup via this rescue system?
I’m gonna speculate here…Something like booting with debian 9 live, installing restic\rclone, mounting root partition and restoring my backup to this mounted partition and then rebooting to boot from this partition?

Yes, this is basically what you’d do.

If you want to clobber the existing system and restore a totally clean backup, the general advice would be to:

  1. Format the root volume from the rescue environment.
  2. Mount the root volume.
  3. Restore from restic using the root volume mountpoint as the restore target.
  4. Update any config files that refer to the volume UUID with the new UUID (e.g. /etc/fstab).
  5. You may need to chroot into the root volume and reinstall/reconfigure the bootloader. (On Debian, update-grub will regenerate the config, then grub-install /dev/$HD where $HD is the boot disk device.)

This will only work if the system is a full-system backup.


So, did you get it to work?

1 Like