Portal Home > Knowledgebase > Articles Database > Cron job help in Cpanel. Want to automate backups


Cron job help in Cpanel. Want to automate backups




Posted by taltos1, 08-20-2007, 09:33 AM
Hello, I have been doing some research and I would love some help with this. I want to set up a cron to automatically backup my site's files & databases once a month. And I am not sure what how I do it? - Do I need a script on my server and then the cron job runs it? - Is there a better way to do this then cron? Thank you very much.

Posted by david510, 08-20-2007, 10:11 AM
Have you got WHM root access? or just a cpanel login?

Posted by taltos1, 08-20-2007, 10:30 AM
capanel login.

Posted by YYamagishi, 08-20-2007, 10:50 AM
Save that as fullbackup.php then upload it to / in FTP Then add cron: 0 0 * * * /usr/local/bin/php /home/(youraccount)/fullbackup.php

Posted by taltos1, 08-20-2007, 11:14 AM
Wow, thank you very much. It seems the script will email the back up, is there a way to place the copy on the ftp server above the public_html folder? Also, is there a way to only backup particular folders on the server as opposed to the entire site? Thanks Last edited by taltos1; 08-20-2007 at 11:20 AM.

Posted by cPanelDavidG, 08-20-2007, 12:19 PM
Yes, simply FTP to your website and not change into your public_html directory. Then upload as you normally would (without going into the public_html directory). This will place your script in /home/username/ instead of /home/username/public_html/ (where username is your cPanel username).

Posted by kovacsakos, 12-19-2010, 07:44 AM
I would like a script, that can restore the automatically generated backups automatically every day. So it should be a "system" that makes backups and restore them every day.(for a demo website) Can you help me?



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Reseller Accounts (Views: 726)
mchost down [Merged] (Views: 879)

Language: