summaryrefslogtreecommitdiff
path: root/share/hydractl/backup-restore-site
diff options
context:
space:
mode:
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