dinsdag 15 september 2009

automating a drupal backup

automating a drupal backup



hi

I use following script to run a daily backup of several drupal sites




DOW = 'date +%a'
SITE = /var/www
BACKUPLOC = /home/backups/
MYSQLPASS = *******
DBNAME = drupaldb



rm $BACKUPLOC/$DOW.*
tar cf $BACKUPLOC/$DOM.tar $SITE
cd $BACKUPLOC
mysqldump -u root -p $MYSQLPASS $DBNAME > $DOW.dump

Geen opmerkingen: