aboutsummaryrefslogtreecommitdiff
path: root/share/hydractl/backup-restore-database
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/backup-restore-database
parent04ffe1502183039ffcefa391573f356f8e398a9c (diff)
downloadhydra-8b9259f6baa1804576e97a98be7fef23caaca6f0.tar.gz
hydra-8b9259f6baa1804576e97a98be7fef23caaca6f0.tar.bz2
Support also database restoration from backups site
Diffstat (limited to 'share/hydractl/backup-restore-database')
-rwxr-xr-xshare/hydractl/backup-restore-database5
1 files changed, 4 insertions, 1 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