diff options
-rwxr-xr-x | share/hydractl/backup-restore-site | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/share/hydractl/backup-restore-site b/share/hydractl/backup-restore-site index 2871b13..0db4667 100755 --- a/share/hydractl/backup-restore-site +++ b/share/hydractl/backup-restore-site @@ -55,6 +55,13 @@ else SITE_GROUP="root" fi +# Local backups are stored compressed +if [ "$1" == "localhost" ] || [ "$1" == "backups" ]; then + if [ -e "$RESTOREDIR/$SITE.tar.bz2" ]; then + ( cd $RESTOREDIR && tar xvf $SITE.tar.bz2 ) + fi +fi + # Check if folder exist on the backup. if [ ! -d "$RESTOREDIR/$FOLDER" ]; then echo "Folder $FOLDER does not exist at restored backup $RESTOREDIR" @@ -74,13 +81,6 @@ if [ -e "$FOLDER" ]; then fi fi -# Local backups are stored compressed -if [ "$1" == "localhost" ]; then - if [ -e "$RESTOREDIR/$SITE.tar.bz2" ]; then - ( cd $RESTOREDIR && tar xvf $SITE.tar.bz2 ) - fi -fi - # Copy site folder from backup if [ -d "$RESTOREDIR/$FOLDER" ]; then echo "Copying site $SITE from backup $RESTOREDIR..." |