Recovering Data via SFTP

Published on: Thu, May 11, 2017 at 10:56 am EST
Linux Guides System Admin

Recovering Data via SFTP

In cases where the installed OS encounters an error that does not allow the OS to boot normally it may be necessary to retrieve data from this instance prior to attempting repairs or re-installation. This process uses a live CD to make the files accessible via SFTP.

  1. Go to https://my.vultr.com -> Servers -> Your VPS Name -> Settings -> Custom ISO

  2. Under ISO Library select Finnix - 111 x86

  3. Click Attach ISO and Reboot

  4. Open the Console (computer icon in top right of server information page).
    Note that the console is temporally unavailable during the restart to attach the ISO. If this window is blank or shows error please close, wait 10 seconds and launch again.

  5. Press enter to select Boot Finnix (64-bit). You must do this within 60 seconds otherwise the VPS will try to boot from the primary disk.

  6. Once at the root@tty1:~# run the following command to check your disk to ensure that there are no errors and/or repair any errors in the filesystem:

    fsck -y /dev/vda1
    
  7. Run the following commands to set the password, enable sftp, and mount your VPS disk:

    passwd
    service ssh start
    mount /dev/vda1 /mnt
    
  8. You can now connect to your VPS using SFTP client software on your local PC.
    The most popular client is Filezilla. When connecting you will use:

    • Host: Your VPS IP
    • Username: root
    • Password: The password you set in the prior step
    • Port: 22
    • Protocol: SFTP

    The files from your VPS will be located under the /mnt folder.

  9. Once the recovery is complete, you can return to the Custom ISO page and click "Remove ISO" to unmount the ISO.

Want to contribute ?

You could earn up to $300 by adding new articles