diff --git a/pages/elastic-metal/troubleshooting/troubleshoot-rescue-your-data.mdx b/pages/elastic-metal/troubleshooting/troubleshoot-rescue-your-data.mdx new file mode 100644 index 0000000000..d0b2041d55 --- /dev/null +++ b/pages/elastic-metal/troubleshooting/troubleshoot-rescue-your-data.mdx @@ -0,0 +1,93 @@ +--- +meta: + title: Rescuing and recovering your data using rescue mode on Elastic Metal servers + description: Learn how to recover and download backups of your data from a Scaleway Elastic Metal server using rescue mode with SFTP +content: + h1: Rescuing and recovering your data using rescue mode on Elastic Metal servers + paragraph: Learn how to recover and download backups of your data from a Scaleway Elastic Metal server using rescue mode with SFTP. +tags: recovery rescue data rescue-mode +dates: + validation: 2025-04-01 + posted: 2025-04-01 +categories: + - bare-metal + - elastic-metal +--- + +If your Elastic Metal 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. + + + +- A Scaleway account logged into the [console](https://console.scaleway.com) +- [Created](/elastic-metal/how-to/create-server/) and [installed](/elastic-metal/how-to/install-server/) Elastic Metal server + +## Booting into rescue mode + +1. Follow [these instructions](/elastic-metal/how-to/use-rescue-mode/) to start your server in rescue mode (emergency system) via the Scaleway console. +2. Log into your server using one of the following methods: + - [PuTTY](http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe) on [Windows](/elastic-metal/how-to/connect-to-server/#how-to-connect-to-an-elastic-metal-server-from-windows) + - `ssh` from a terminal on [Linux or macOS](/elastic-metal/how-to/connect-to-server/#how-to-connect-to-an-elastic-metal-server-from-osx-mac-and-linux). + + + The rescue mode credentials (username and password) are displayed in your Scaleway 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: + ```bash + sudo su + ``` +2. Enter the rescue user password displayed in the Scaleway console and press Enter. + + + 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. + +As the `root` user, run the following command to mount all partitions: + ```bash + mountall.sh + ``` + The partitions will be mounted in the `/mnt` directory. + + + 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 downloading it directly to your local computer via SFTP. + + + Exercise caution when editing your data in rescue mode. The `root` user has full permissions, including the ability to irreversibly delete files. + + +### Backing up data to your personal computer (via SFTP) + +You can use an SFTP client like [FileZilla](https://filezilla-project.org/) to download data from your server. + +Open FileZilla and fill in the following details: + - **Host**: Your server’s IP address + - **Username**: Rescue mode username (e.g., `em-XXXX`) + - **Password**: Rescue mode password + - **Port**: 22 + + + 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. + + + If you encounter difficulties, consider contacting a [certified outsourcer](https://www.scaleway.com/en/dedibox/outsourcing/) for professional data recovery. + diff --git a/pages/elastic-metal/troubleshooting/troubleshoot-ssh-issues.mdx b/pages/elastic-metal/troubleshooting/troubleshoot-ssh-issues.mdx index 4327dfc6af..72a6b78e29 100644 --- a/pages/elastic-metal/troubleshooting/troubleshoot-ssh-issues.mdx +++ b/pages/elastic-metal/troubleshooting/troubleshoot-ssh-issues.mdx @@ -29,6 +29,7 @@ You are unable to connect to your Scaleway Elastic Metal server via SSH. - Incorrect SSH credentials or key configuration. - The server is in rescue mode and requires a different login method. - A recent security policy change has disabled SSH access. +- You recently changed your SSH keys, and they have not been added to the Elastic Metal server. ## Solution @@ -54,4 +55,9 @@ You are unable to connect to your Scaleway Elastic Metal server via SSH. #### Verify the SSH service status - Use the remote console from the Scaleway dashboard to access your server. - Run `systemctl status ssh` to check if the SSH service is running. -- If the service is stopped, restart it using `systemctl restart ssh`. \ No newline at end of file +- If the service is stopped, restart it using `systemctl restart ssh`. + +#### Add the new SSH key to the existent system +- Reboot in rescue mode as explained in this [documentation](/elastic-metal/how-to/use-rescue-mode/) +- Mount filesystem in rescue mode to access data and files by folowing these [steps](/elastic-metal/troubleshooting/troubleshoot-rescue-your-data/##mounting-partitions) +- Modify the "authorized_keys" file to add your new SSH public key at the end