aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xshare/hydractl/backup-restore-database5
-rwxr-xr-xshare/hydractl/backup-restore-site2
2 files changed, 5 insertions, 2 deletions
diff --git a/share/hydractl/backup-restore-database b/share/hydractl/backup-restore-database
index 996760a..f7fe1c3 100755
--- a/share/hydractl/backup-restore-database
+++ b/share/hydractl/backup-restore-database
@@ -27,7 +27,10 @@ DATABASE="$2"
BASEDIR="/tmp"
# Check restore strategy.
-if [ "$HOST" == "localhost" ] || [ "$HOST" == "`facter hostname`" ]; then
+if [ "$1" == "backups" ]; then
+ DATABASE="$3"
+ hydra_backup_environment_local_website $2 $3
+elif [ "$HOST" == "localhost" ] || [ "$HOST" == "`facter hostname`" ]; then
hydra_backup_environment_local
else
hydra_backup_environment_remote $HOST restore
diff --git a/share/hydractl/backup-restore-site b/share/hydractl/backup-restore-site
index f9d7acc..3968b7f 100755
--- a/share/hydractl/backup-restore-site
+++ b/share/hydractl/backup-restore-site
@@ -147,7 +147,7 @@ if [ -e "$FOLDER/drupal" ]; then
fi
# Restore database
-hydra_backup_restore_database $SITE
+hydractl backup-restore-database $*
# Ikiwiki
if [ -e "$FOLDER/ikiwiki" ]; then