Recover the Data from a crash by mounting Rescue CD on a VPS
Step 1: Mount the Rescue CD on your VPS
Login to the CrownPanel account and select the VPS you need to recover data from. From the CD-ROM tab, choose the system rescueCD and mount it.
Then launch the VNC and after a moment, you should get a screen similar to this : Select Default boot options
and hit enter you will get below screen:
You've now entered the rescueCD
Step 2: Network
The network will be automatically configured and it will be up, enter the following command to verify network details
nmcli
and command to view network connection,
nmcli connection show
To verify if the network is UP
ping 8.8.8.8
Step 3: Disable iptables
System RescueCd comes with the iptables firewall enabled, enter the following command to disable it
systemctl stop iptables
Step 4: Mounting the Disk
For you to be able to connect via SSH, Password has to be set up with the following command
passwd root
Now let us mount the disk itself to recover the data
fdisk -l is the command used to list the disks, partitions, etc in Linux
fdisk -l
Output of Linux Operating System Partition.
Output of Windows Operating System Partition.
Here we see the partition
/dev/vda1 | Type "Linux"
and
/dev/vda2 | HPFS/NTFS/exFAT
So from the above examples, we see the largest partition which holds our data.
Now we make a new folder and mount the partition to access it,
command to make a folder
mkdir hdd
command to mount partition
mount /dev/vda1 hdd
Next, you can enter the folder "hdd" and then list the files
The output of files contains in the Linux Operating System.
The output of files contains in the Windows Operating System.
So this is the full filesystem
You can now SSH into the VPS IP and recover the files required