For AI agents: the complete documentation index is available at https://docs.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.ovhcloud.com/en/llms-full.txt, and this page is available as Markdown at https://docs.ovhcloud.com/en/guides/public-cloud/compute/put-an-instance-in-rescue-mode.md.
Skip to content

How to activate rescue mode on a Public Cloud instance

View as Markdown

Find out how to enable and use the OVHcloud rescue mode for your Public Cloud instance

Objective

Your Public Cloud instance may become inaccessible due to a lost SSH key or configuration errors.

In such circumstances, you can use the rescue mode to reconfigure your instance or to recover your data.

This guide explains how to restart your OVHcloud Public Cloud instance into rescue mode and access your files.

Requirements


OVHcloud Console Access

  • Direct link:
  • Navigation path: Public Cloud > Select your project > Compute > Instances

Instructions

Danger

To date, rescue mode for Metal instances cannot be accessed via the OVHcloud Console. For more information, please refer to our guide on rescue mode for Metal instances.

Step 1: Activating rescue mode

In the left-hand menu of your Public Cloud project, click Instances under Compute.

Click on ... in the row of the instance concerned and select Reboot in rescue mode.

In the Reboot in rescue mode window, select the distribution you would like to use in rescue mode in the drop-down list (the OVHcloud rescue distribution is preselected), then click the Confirm button.

A message confirms that the instance is rebooting in rescue mode.

Your temporary rescue mode password will only be shown in the VNC console. Click on your instance in the table, then switch to the VNC console tab to retrieve it.

Step 2: Accessing your data

When rescue mode has been activated, your instance's data will be attached as an additional disk. You will now need to mount it, by taking the following steps.

Establish an SSH connection to your instance. Once you are connected, verify the available disks with this command:

lsblk

The result will look similar to the following example output:

NAME    MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda       8:0    0  2.9G  0 disk
└─sda1    8:1    0  2.9G  0 part /
sdb       8:16   0   25G  0 disk
├─sdb1    8:17   0   24G  0 part
├─sdb14   8:30   0    4M  0 part
├─sdb15   8:31   0  106M  0 part
└─sdb16 259:0    0  913M  0 part

In rescue mode, sda is the rescue mode disk and sda1 is the primary rescue partition mounted on /.

In this example, the primary disk is sdb and the system partition is sdb1 (indicated by the size).

Mount this partition with the following command:

mount /dev/sdb1 /mnt/

Your data will now be accessible from the /mnt folder.

Step 3: Deactivating rescue mode

Once you have completed your tasks, you can deactivate rescue mode by rebooting your instance from the OVHcloud Console. To execute this, click on ... in the row of the instance and select Exit rescue mode, then click Confirm in the window that opens.

Warning

If the Exit rescue mode button is not displayed while the instance is in rescue mode, we recommend that you refresh your browser tab.

Activating rescue mode using the OpenStack API

You can also activate rescue mode via the OpenStack API using the following command:

nova rescue INSTANCE_ID

To exit rescue mode, use the following command:

nova unrescue INSTANCE_ID

Go further

How to replace an SSH key pair on an instance

Join our community of users.

Was this page helpful?