View Single Post
Old 03-17-2006, 03:59 PM  
PR_EZEKIEL
Confirmed User
 
Join Date: Feb 2005
Location: On The River
Posts: 134
thing with cronjobs is that you can either run scripts like you would from the command line..eg.
0 0 * * * php /usr/local/www/backup.php
or you can run shell commands...
depending on where your data is then your backups could be simple...
0 0 * * * tar czvf /usr/local/www/sitenamedatabasefolder.tag.gz /var/db/mysql/sitedatabasefoldername
30 0 * * * tar czvf /usr/local/www/site.tar.gz /usr/local/www/sitefolder
first one would run at midnight, second one would run at 12:30
you might want to think of writing a little script that backs it up so you have 2 days worth of backups or something. That way you're not just overwriting your backups(just in case something bad happens to everything at 11:59 and you want to make sure you're back up isn't a back up after the shit hit the fan)
PR_EZEKIEL is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote