From 26cbb26cebd495fd6260b6af65b37fe5c8a8c00b Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Wed, 4 Jan 2012 15:43:08 -0200 Subject: Support for restoring backups from /var/backups/restore; svn and git restore support --- share/hydractl/backup-restore | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'share/hydractl/backup-restore') diff --git a/share/hydractl/backup-restore b/share/hydractl/backup-restore index 160ed5e..a5bfd42 100755 --- a/share/hydractl/backup-restore +++ b/share/hydractl/backup-restore @@ -2,12 +2,16 @@ # # Backup restoration. # -# TODO: optionally restore from local backup -# # Load. source $APP_BASE/lib/hydra/functions || exit 1 hydra_config_load -hydra_backup_environment_remote $* +# Check restore strategy. +if [ "$1" == "localhost" ]; then + hydra_backup_environment_local $2 restore +else + hydra_backup_environment_remote $1 restore +fi + duplicity restore file:///$BACKUPDIR/ $RESTOREDIR/ -- cgit v1.2.3