How to back up data on shared hosting and reseller accounts

This article describes how set up your own manual or automatic backups on a shared hosting or reseller account.

Web site file backups #

You can back up web site files in your home directory manually and automatically.

Manual backups #

To do a manual backup of web site files in your home directory, log in to your account using SSH. Type the following command, replacing username with your Heaven Hoster account username:

/bin/tar -czvf /home/username/public_html.tar.gz /home/username/public_html

This command creates a compressed file named public_html.tar.gz that contains all of the files in your public_html directory.

Automatic backups with cron #

You can set up a cron job to do scheduled automatic backups of your web site files. You can configure cron jobs from the command line, but you can also use cPanel. All you need to do is specify the backup interval (for example, weekly, monthly, etc.) and the command to run. You can use the above command for a manual backup in the cron job.

MySQL database backups #

As with web site files, you can do manual and automatic MySQL database backups.

cPanel also provides backup functionality for shared hosting accounts.

error: