From: Silvio Rhatto Date: Tue, 11 Mar 2014 16:43:50 +0000 (-0300) Subject: Fix RESTOREDIR at hydra_backup_environment_local_website X-Git-Tag: 0.2.2~54 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=fa60b3cbc4327201165fba7dc8a5538d4859e7c3;p=hydra.git Fix RESTOREDIR at hydra_backup_environment_local_website --- diff --git a/lib/hydra/backup b/lib/hydra/backup index 0fb6e80..000bc5a 100644 --- a/lib/hydra/backup +++ b/lib/hydra/backup @@ -19,7 +19,7 @@ function hydra_backup_environment_local_website { # Try to get the newest if there's no backup for the current date if [ ! -e "$RESTOREDIR/$SITE.tar.bz2" ]; then - RESTOREDIR="$(find $BACKUPDIR -name "$SITE.tar.bz2" | sort -n | tail -n 1)" + RESTOREDIR="$(find $BACKUPDIR -name "$SITE.tar.bz2" -exec dirname {} \; | sort -n | tail -n 1)" if [ -z "$RESTOREDIR" ]; then echo "Backup not found for $DATE."