View Single Post
Old 05-12-2009, 07:57 PM  
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,524
just create a shell script and execute it.

(once a day)

0 0 * * * /home/user/wpbackup.sh

Code:
#!/usr/bin/bash

date="`eval date +%Y%m%d`";
mysqluser="mysqluser"
mysqlpass="mysqlpassword"
mysqldb="blogdatabase"
backupsource="/home/user/public_html/"
backupdest="/home/user/backups/"

echo "creating database backup"
mysqldump -q -e -h localhost -u ${mysqluser} -p${mysqlpass} ${mysqldb} | gzip - > ~/${backupdest}${date}_db-backup.sql.gz
echo "done"
echo "creating file system backup"
cd ~/${backupsource}
tar cf - . | gzip - > ~/${backupdest}${date}_files.tar.gz
echo "done"
echo "wordpress backup complete"
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


My Cam Feeds Script / Gallery Scraper / WPXXX Theme / Free Templates
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote