Web Hosting Hub offers an automated backup service, however you can also make your own cPanel backups with your account that can run however often you want to backup your site. We recommend backing up your website occasionally in case something happens so that you do not lose all your content.  You can get the script to generate a cPanel backup here: http://www.v-nessa.net/2007/01/03/cpanel-automated-backup-script

This is a simple script created from the cPanel process that generates full account backups, only in PHP form. This makes the task of backing up your site much easier and more reliable by allowing you to create and maintain your own full site backups.

How to use the script to generate a cPanel backup

1. Download the script to your computer and extract the file: http://v-nessa.net/index.php?dl=cpanel_backup-1.6.zip

2. Edit the cpanel_backup.php file with your cPanel settings:

$cpuser = "Your cPanel username";

$cppass = "Your cPanel password";

$domain = "The domain name where cPanel is run, usually without the www's";

$skin = "cPanel skin that you are currently running, which will usually be 'x3' ";

The next section will set up the FTP options to upload the backup tarball to a server. If the FTP location is the same as the server the has the account you are backing up, leave these blank.

$ftpuser = "";
// Username for your FTP site

$ftppass = "";
// Password for your FTP site

$ftphost = "FTP hostname";
// (usually ftp.yourdomainname.com)

$ftpmode = "The mode in which you would like to have the file transferred.";
// We would recommend "passive" mode, especially for larger sites.

$notifyemail = "";
// The email address that the backup confirmation should be sent to once the backup is complete

$secure = "";
// Whether or not to allow the script to access your cPanel through its secure ports

$debug = "Whether or not to show the detailed backup results in your confirmation email";

3. Once the php file has been configured, upload it to your server. It is very important that you upload the file outside of your document root (public_html) with permissions of 600.

4. Now, all you need to do is set the crontab. Log into your cPanel and go to the "Cron Jobs" section and choose "Standard." Here is where you will create the actual cron job to run the script whenever you want. The command may vary depending on the setup of PHP on your server, but your Cron command will be as follows:

php -q /home/username/cpanel_backup.php

Did you find this article helpful?

Login to comment.

Your Opinion Matters

... but we need to know what you're thinking!

The Community Support team wrote the article you're looking at now. We like to think it's perfect, but we're sure you have some suggestions. Please, let us know what they are!

Feedback
Your Email Address
Because we'd like to talk with you!

Support Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.