PDA

View Full Version : Cron job for a backup



mrjerryk
08-18-2006, 06:32 AM
Does anyone know if you can have a cron job to backup a phpbb forum? I would like to set it to back it up every day. If so can you post the code for me?

Thanks

dkinzer
08-18-2006, 07:58 AM
I'm using Wolf's db_backup script with a small modification (SMTP authorization). You can get the script package at:
http://restkultur.ch/personal/wolf/scripts/db_backup

shirleymixon
08-18-2006, 08:33 AM
I have another site at bluehost and I run a cron that sends me an email saying job done and writes the mysql to the second site...don't know how to tar/zip my code and back it up too...have to do a full site backup...
what is the cron code you use to backup phpBB2?
http://techpatterns.com/forums/about282.html looked at this first but not sure yet...

I also run a classified ads program that I want to back up all program code which is in a folder using a subdomain...could I ftp into this folder and do a backup/restore?

can anyone help me with that need?

dkinzer
08-18-2006, 12:45 PM
I use a cron entry like this:

20 2 * * * (cd /home/userdir/scripts/db_backup; /usr/bin/php db_backup.php)

There are many other possible variations that will work depending on where you place the db_backup script.

As far as doing a backup of your complete site, use tar. You can find information on using cron jobs and tar in many places on the Internet.