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.

For information about the automatic server backups that A2 Hosting provides and the Server Rewind feature, please see this article.

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 A2 Hosting 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.

For detailed information about how to set up a cron job using cPanel, please see this article.

MySQL database backups

As with web site files, you can do manual and automatic MySQL database backups. For information about how to create backups of your MySQL databases, please see this article.

Backups in cPanel

cPanel also provides backup functionality for shared hosting accounts. For information about how to use cPanel to create backups, please see this article.

Article Details

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.