cpanel_logoLooks like I finally figured out how to automate cpanel backups.  Since most of my sites are all hosted on the same account backup was a sinch with cpanel full backup.  Only issue was that I could not automate the task until now!

First I setup my own local FTP so I had a remote place to put the files.  Then using the script below edited it put in my cpanel variables and then created a cron job to run the file.  The issue wasn’t finding this script, I have had it for a while, the issue was getting the darn thing to work.  Looks like what I was missing was changing the $skin parameter to ‘lp’…thank you Lunar Pages Forum (yes should have looked there a long time ago but didn’t).  Lunar Pages would be my host and looks like they have their own skin for cpanel.  Once I got that in place everything worked perfectly and then I just scheduled the cron job below.

Here is the script cpanel_backup.php

Update: I had to make some minor changes to the file to include the remote directory and FTP port as I was getting errors saying all the forms were not filled out. Here is the latest version cpanel_backup.php Version 2

Then schedule the script job via Cron
0 0 * * 1 /usr/bin/env php cpanel_backup.php

« »