How to Activate and use rescue mode on a VPS
Rescue mode is a tool provided by Truehost Cloud for you to boot your VPS into a temporary operating system. You can then access your system in order to run diagnostic tasks and resolve various issues such as: Access your Truehost Client Area Portal 1 Go to Services -> Click on Your VPS server -> [&
Rescue mode is a tool provided by Truehost Cloud for you to boot your VPS into a temporary operating system. You can then access your system in order to run diagnostic tasks and resolve various issues such as:
- Resetting your user password to regain access
- Diagnosing network problems
- Repairing a broken operating system or kernel related issues.
- Fixing a misconfigured software firewall
- Testing disk performance
- Perform data backup.
Access your Truehost Client Area Portal
1 Go to Services -> Click on Your VPS server ->
2. Click on the Rescue mode Icon

3. Enter your desired root password and click enable rescue.

Login to the server using the set details
Once you are connected, you will notice you are now logged in to the server in rescue mode as below.

root@rescue
Next, verify the attached disks with this command:
**lsblk**
The result will look similar to the following example output:
root@rescue:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTvda 254:0 0 2G 0 disk โโvda1 254:1 0 2G 0 part / vdb 254:16 0 30G 0 disk โโvdb1 254:17 0 29G 0 part โโvdb2 254:18 0 999M 0 part
In rescue mode above, vda is the rescue mode disk and vda1 is the primary rescue partition mounted on / partition.
In this example, the primary disk of the VPS is vdb and the system partition is vdb1 (indicated by the size).
Mount this partition with the following command:
mount /dev/vdb1 /mnt/
Your files are now accessible from the mount point /mnt:
cd /mnt
**ls**
You should then see your file system displayed:
bin boot dev etc home lib lib32 lib64 libx32 lost+found media mnt opt proc root run sbin snap srv sys tmp usr var
Navigate to home folder for your files
Navigate to /var/lib/yourdatabases

Before you can manipulate this partition however, you need to open it for write access which you can do with the following command:
chroot /mnt
In our case, Iโll generate a backup of lint_whmcs database.
tar -cvzf lint_whmcs_backup.tar.gz lint_whmcs/
Move it to home or a remote server.
mv lint_whmcs_backup.tar.gz /mnt/home/
Once you have completed your actions in rescue mode, reboot the VPS again in the regular mode
NOTE: For most changes you make to your server via SSH while in rescue mode, you will need to mount the system partition.
IMPORTANT :
Do not confuse theย /ย directory with theย /rootย directory. Theย /rootย directory is the home directory of the root user. Theย /rootย directory is sometimes referred to asย slash rootย to distinguish it from the root directory. |