If your server is no longer booting properly or you need to recover files before reinstalling, you can access your data through the rescue system.
-
Enable the rescue system
As explained in this getting started:
- Select the server
- Navigate to "Rescue" and click on "Enable rescue & power cycle"
- After the reboot, connect to the server as root user.
-
Mount the root partition
Run
lsblkand identify the name of the root partition (e.g.sda1).Mount the root partition into
/mnt:Replace
sda1with the name of your root partition.mount /dev/sda1 /mntYou can now navigate through the file structure of your server's primary disc under
/mnt.
-
Back up data
Transfer the data to your local machine using
scporrsync. Example commands on your local machine:scp -r root@<your-server-ip>:/mnt/home/user/important-data ./ rsync -avz root@<your-server-ip>:/mnt/etc ./backup/In addition to the local copy of the data, you can take a Snapshot or enable Backups in Hetzner Console or via the Hetzner API to store a copy of the full disk. If anything goes wrong, you can rebuild the server via the Snapshot or Backup and try again.
-
Restart the server
Once your data is secured, restart your server to leave the rescue system:
reboot
The data should now be save.