aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/hydra/backup5
-rwxr-xr-xshare/hydractl/backup-restore-site4
2 files changed, 3 insertions, 6 deletions
diff --git a/lib/hydra/backup b/lib/hydra/backup
index 210139b..260446d 100644
--- a/lib/hydra/backup
+++ b/lib/hydra/backup
@@ -36,10 +36,7 @@ function hydra_backup_environment {
exit 1
fi
else
- if [ "$METHOD" == "restore" ]; then
- echo "Invalid backup method 'restore'"
- exit 1
- elif [ -d "$BACKUPDIR/$METHOD" ]; then
+ if [ -d "$BACKUPDIR/$METHOD" ]; then
BACKUPDIR="$BACKUPDIR/$METHOD"
else
echo "Backup folder for $METHOD not found at $BACKUPDIR"
diff --git a/share/hydractl/backup-restore-site b/share/hydractl/backup-restore-site
index bf68779..16ebf93 100755
--- a/share/hydractl/backup-restore-site
+++ b/share/hydractl/backup-restore-site
@@ -8,7 +8,7 @@
source $APP_BASE/lib/hydra/functions || exit 1
hydra_config_load
-SITE="$3"
+SITE="$2"
SITES="/var/sites"
FOLDER="$SITES/$SITE"
@@ -17,7 +17,7 @@ if [ -z "$SITE" ]; then
exit 1
fi
-hydra_backup_environment $*
+hydra_backup_environment $1 restore
# Check if folder exist on the backup
if [ ! -d "$RESTOREDIR/$FOLDER" ]; then