aboutsummaryrefslogtreecommitdiff
path: root/share/hydractl/backup-restore-site
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-09-27 18:07:24 -0300
committerSilvio Rhatto <rhatto@riseup.net>2011-09-27 18:07:24 -0300
commit9330113df08676ec82639aec8cca290709b7936e (patch)
tree93600833840c1d0f6d7420511335bf12bfc51195 /share/hydractl/backup-restore-site
parentc040869beb026ecc309bf1c2ccf627261f41bc46 (diff)
downloadhydra-9330113df08676ec82639aec8cca290709b7936e.tar.gz
hydra-9330113df08676ec82639aec8cca290709b7936e.tar.bz2
Action backup-site now dumping db and storing things in the right place
Diffstat (limited to 'share/hydractl/backup-restore-site')
-rwxr-xr-xshare/hydractl/backup-restore-site8
1 files changed, 7 insertions, 1 deletions
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