From 9330113df08676ec82639aec8cca290709b7936e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 27 Sep 2011 18:07:24 -0300 Subject: Action backup-site now dumping db and storing things in the right place --- share/hydractl/backup-restore-site | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'share/hydractl/backup-restore-site') diff --git a/share/hydractl/backup-restore-site b/share/hydractl/backup-restore-site index 16ebf93..d02fb79 100755 --- a/share/hydractl/backup-restore-site +++ b/share/hydractl/backup-restore-site @@ -60,7 +60,6 @@ fi # Site if [ -e "$FOLDER/site" ]; then chown -R $SITE.$SITE $FOLDER/site - echo "Databases should be manually restored" fi # Drupal @@ -71,3 +70,10 @@ if [ -e "$FOLDER/drupal" ]; then chown root.$SITE $FOLDER/drupal/settings.php chmod 640 $FOLDER/drupal/settings.php fi + +# Restore database +if [ -f "$RESTOREDIR/var/backups/mysql/sqldump/$SITE.sql.gz" ]; then + hydra_truncate_database $SITE +else + echo "Databases should be manually restored" +fi -- cgit v1.2.3