]> gitweb.fluxo.info Git - hydra.git/commitdiff
Support also database restoration from backups site
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 22 Jul 2012 20:20:24 +0000 (17:20 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 22 Jul 2012 20:20:24 +0000 (17:20 -0300)
share/hydractl/backup-restore-database
share/hydractl/backup-restore-site

index 996760a7ab468a7d86f14c5564851a5703244f0f..f7fe1c3faad99f95ad2f49d26bd979bf40e9d9d9 100755 (executable)
@@ -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
index f9d7acc3da9ad7dd99e58f517d8a6f8375b9ac03..3968b7f178180b815a068f01cb15aa658c96e21c 100755 (executable)
@@ -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