How to Upload a Backup Using SSH

Uploading files from your local device to your hosting with SSH

Updated over a week ago

SSH provides a fast and efficient way to transfer files from your local computer to the server, especially when dealing with larger files. If your hosting plan is Web Premium or greater, you can use this method 🚀

First, ensure that SSH access is enabled on your hosting plan. Then, open the Terminal if your device is Linux/Mac or Command Prompt or PowerShell for Windows.

To upload your files, use the scp command with the following format:

scp -P 65002 home/user/Desktop/[filename] username@IP:path/to/backup

Replace the placeholders with your specific backup information:

  • home/user/Desktop/[filename] - the local path to the file and its name

  • username@IP - your hosting plan's username and the hosting IP. You can find this information in the SSH details section of hPanel

  • path/to/backup - the path on your hosting plan where you want to upload the file. Make sure to start from /home

Let's go over an example on a Windows computer:

  • Local path and filename: C:/Users/MyUser/Desktop/File.txt

  • Hosting username and IP: u123456789@

  • Hosting path: /home/u123456789/domains/domain.tld/public_html

The end result would look like this:

scp -P 65002 C:/Users/MyUser/Desktop/File.txt u123456789@

Once you execute the command, you'll be prompted to enter your SSH password. Type the password, press Enter, and the upload process will begin.

Additional Resources

Did this answer your question?