From 3f397ff1575b79f74184302f3c3b8e549895f571 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 4 Jan 2012 18:43:33 -0200 Subject: Adding backup/copy sites; restoration fixes --- share/hydractl/backup-restore | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'share/hydractl/backup-restore') diff --git a/share/hydractl/backup-restore b/share/hydractl/backup-restore index a5bfd42..438d1a6 100755 --- a/share/hydractl/backup-restore +++ b/share/hydractl/backup-restore @@ -7,11 +7,17 @@ source $APP_BASE/lib/hydra/functions || exit 1 hydra_config_load +# Syntax check. +if [ -z "$1" ]; then + echo "Usage: `basename $0` [rsync|rdiff]" + exit 1 +fi + # Check restore strategy. if [ "$1" == "localhost" ]; then - hydra_backup_environment_local $2 restore + hydra_backup_environment_local else - hydra_backup_environment_remote $1 restore + hydra_backup_environment_remote $* fi duplicity restore file:///$BACKUPDIR/ $RESTOREDIR/ -- cgit v1.2.3