How to create a backup of your files/directories via SSH

While cPanel offers a range of tools for backing up files and folders stored on your server, you can also perform backups using the command line, via Secure Shell (SSH).

Log in to your server using SSH, then navigate to the directory you wish to back up with the cd command. Type ls at any time to view the contents of the folder.

When you have navigated to the folder, type the following command:

tar -vcf mybackupfile.tar.gz. 

Be sure to include the trailing period in the command. You can change mybackupfile to a filename of your choice.

The backup file will be stored in the same directory. Use an FTP application or cPanel File Manager to download the backup file to a local computer.

If you need help with your HostPapa account, please open a support ticket from your dashboard.

Related Articles