Rescue mode is useful when you lose access to your server and SSH becomes unreachable. It allows you to recover data and make changes to the instance without having to use Remote access or reinstall the device.
When you put a server in rescue mode, we load a lightweight Ubuntu image into your server's memory. This allows you to SSH to the machine and do maintenance.
Rescue is not available for servers running Windows.
Booting into Rescue Mode
In order to boot into rescue mode, simply go to the settings page of your server and click Enter rescue mode.
Accessing the server
When the server finishes loading the rescue operating system, a user and password with root access will be shown on the server overview page.
Mounting the root partition
The first thing we need to do is find the root partition. Running
lsblk will retrieve all partitions. Find the disk that represents the root partition of your server. This is usually the largest partition from the ones listed.
Mount the partition replacing the placeholder with the root partition name:
sudo mount /dev/sda2 /mnt -t ext4
Here we are mounting the root partition
/dev/sda2 to the
Root partition for servers with NVMe disks are slightly different, similar to the example below:
sudo mount /dev/nvme0n1p1 /mnt -t ext4
When the partition mounts successfully, go to the
/mnt directory to work on your files.
If we find issues entering or exiting rescue mode, the server will return to its previous state, either Deployed or Failed, depending on the case. This is an indication to use Remote access to troubleshoot your server instead.
Updated 9 days ago