Here’s the full tutorial on creating automated cPanel backups. Use this form to generate a PHP backup script that creates a cPanel backup.

If you’d like the raw code instead of filling out the form below, visit the Github repo.

To enable automatic uploads of backups to an FTP server, fill out the FTP form fields. If you wish to disable the remote FTP upload feature, simply leave the FTP server field blank and your backups will be saved in your home directory on the cPanel server (the default location).

Your cPanel URL (?):
cPanel username:
cPanel password:
 
FTP Server:
FTP Username:
FTP Password:
FTP Port:
FTP Directory:

Result:

The source code for this script generator can be found on my Github. The PHP code is an upgraded/updated version of this original script from 2006.

Leave a Reply

49 Comments on "cPanel Auto Backup Script Generator"

what this problem?

Warning: file_get_contents(http://gtabazan.com:2082/frontend/paper_lantern/backup/dofullbackup.html): failed to open stream: HTTP request failed! HTTP/1.0 401 Access Denied in /home3/gtabazan/public_html/backup/cpanel_backups.php on line 43
Error backing up server.

Eroarea mea:

Warning: file_get_contents(http/frontend/https:///backup/dofullbackup.html): failed to open stream: No such file or directory in /home/zone4metin/backup.php on line 43
Error backing up server.

WHY? ?!

Hi Eric, Thank you for this great article.
I would like to save the backup file on the local server (under /backup/cpbackup ”
and not to use FTP … what do I need to do ?

thanks in advanced !

Does it support other then x3 theme?

You’ve made some changes within the last few months and it’s broken for me…

Hi Eric, Thank you for this great article. I am getting Blank mail notifications & also the remote FTP backup is not happening (Checked Manually). I have used this command “php -f ~/backup.php” @ Cron job, to run the generated backup.php file. Please help.

Hi Eric, great article – thanks. I have the same issue as Joe. Simply errors backing up the server. outputting the result and it is empty.

Hi Eric, thanks for your help over email. I tracked my issue down to being a php.ini setting for allow_url_fopen being false.

hi eric

it doesnt work for me 🙁

i get email “error backing up server”

can i send you my script and ftp credentials so you can see were i went wrong

thanks

1 2 3 5
wpDiscuz