NavigationContentFooter
Jump toSuggest an edit

How to rescue and recover your data using rescue mode

Reviewed on 19 August 2024Published on 11 June 2021

If your server encounters issues but does not have a hardware failure, you can still recover your data using rescue mode, regardless of whether you are using Windows or Linux.

Before you start

To complete the actions presented below, you must have:

  • A Dedibox account logged into the console
  • A created and installed dedicated server

Booting into rescue mode

  1. Follow these instructions to start your server in rescue mode (emergency system) via the Dedibox console.

  2. Log into your server using one of the following methods:

    • PuTTY on Windows
    • ssh from a terminal on Linux or macOS.
    Tip

    The rescue mode credentials (username and password) are displayed in your Dedibox console.

Gaining root access

By default, you are logged in as a regular user in rescue mode and may not have permission to execute all necessary commands.

  1. Switch to the root account by typing the following command and pressing Enter:

    sudo su
  2. Enter the rescue user password displayed in the Dedibox console and press Enter.

    Tip

    For security reasons, the password will not be visible when typing.

Mounting partitions

To access your data, you need to mount your server’s partitions in rescue mode. If this step succeeds, you can likely recover your files.

  1. As the root user, run the following command to mount all partitions:

    mountall.sh

    The partitions will be mounted in the /mnt directory.

    Note

    You may encounter errors such as swap cannot be mounted or many partitions do not exist. These can be safely ignored.

Recovering your data

You can recover your data by either transferring it to the Dedibackup storage space or downloading it directly to your local computer via SFTP.

Important

Exercise caution when editing your data in rescue mode. The root user has full permissions, including the ability to irreversibly delete files.

Recovering data using Dedibackup

To back up all disk contents (including partitions) to your Dedibackup storage:

  1. Install an FTP client and screen using the following command:

    apt -y install screen lftp
  2. Start screen:

    screen
  3. Transfer your data with this command:

    lftp -u YOUR_DEDIBACKUP_LOGIN,YOUR_DEDIBACKUP_PASSWORD dedibackup.online.net -e "mirror --reverse /mnt /; exit"
    Note

    Replace YOUR_DEDIBACKUP_LOGIN with your Dedibackup login (e.g., sd-XXXX) and YOUR_DEDIBACKUP_PASSWORD with your Dedibackup password.

    Tip

    If you have forgotten your password, reset it in the console to generate a new one.

You can now access your files via any FTP client connected to Dedibackup.

Tip

Dedibackup is limited to 1000 files per volume. Consider using archives when backing up data.

Backing up data to your personal computer (via SFTP)

You can use an SFTP client like FileZilla to download data from your server.

  1. Open FileZilla and fill in the following details:
    • Host: Your server’s IP address
    • Username: Rescue mode username (e.g., sd-XXXX)
    • Password: Rescue mode password
    • Port: 22
    Tip

    These details are available in your console once rescue mode is active.

Example configuration

Your data will be located in the /mnt, /sda1, or /sda directories. You can download it before reinstalling the server or transferring data to another server.

Tip

If you encounter difficulties, consider contacting a certified outsourcer for professional data recovery.

See also
How to use rescue modeHow to use IPMI on a server
Was this page helpful?
API DocsScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCareers
© 2023-2024 – Scaleway