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.

60
Leave a Reply

43 Comment threads
17 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
50 Comment authors
John

If you don’t want to set up a remote ftp or ssh connection here is a nice trick to automate the backup but at the same time don’t expose your remote credentials:
https://diy.2pmc.net/cpanel-auto-remote-backup-script-without-remote-credentials/

[…] Automatic cPanel Backups cPanel Auto Backup Script Generator Howto: Automatic cPanel Backups cPanel Automated Backup Script How do I Generate a cPanel Backup […]

Bryce

For those getting the “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, change it to the following, and that should fix it:

$url = “https://”. $domain . “:2083/frontend/” . $theme . “/backup/dofullbackup.html”;

Also, be aware that “paper_lantern” for the theme name has an underscore in it.

1 4 5 6