summaryrefslogtreecommitdiff
path: root/share/hydractl
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2012-07-22 17:20:24 -0300
committerSilvio Rhatto <rhatto@riseup.net>2012-07-22 17:20:24 -0300
commit8b9259f6baa1804576e97a98be7fef23caaca6f0 (patch)
tree4e8b3625e88599fb459b48d94e45ce1c359c41cb /share/hydractl
parent04ffe1502183039ffcefa391573f356f8e398a9c (diff)
downloadhydra-8b9259f6baa1804576e97a98be7fef23caaca6f0.tar.gz
hydra-8b9259f6baa1804576e97a98be7fef23caaca6f0.tar.bz2
Support also database restoration from backups site
Diffstat (limited to 'share/hydractl')
-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