From: Silvio Rhatto Date: Tue, 27 Sep 2011 20:16:30 +0000 (-0300) Subject: Allowing DATE for hydra_backup_environment X-Git-Tag: 0.1~296 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=6f1d9b5e34fb1be181874633cfcde77a5db0b8f9;p=hydra.git Allowing DATE for hydra_backup_environment --- diff --git a/lib/hydra/backup b/lib/hydra/backup index 252d41a..210139b 100644 --- a/lib/hydra/backup +++ b/lib/hydra/backup @@ -7,7 +7,12 @@ function hydra_backup_environment { BACKUP_ROOT="/var/backups/remote" DOMAIN="`facter domain`" BACKUPDIR="$BACKUP_ROOT/$NODE.$domain" - RESTOREDIR="$BACKUPDIR/restore/`date +%Y%m%d`" + + if [ ! -z "$DATE" ]; then + RESTOREDIR="$BACKUPDIR/restore/$DATE" + else + RESTOREDIR="$BACKUPDIR/restore/`date +%Y%m%d`" + fi if [ -z "$NODE" ]; then hydra_action_usage