diff --git a/buildscripts/release.sh b/buildscripts/release.sh index 2adc422..cf51686 100755 --- a/buildscripts/release.sh +++ b/buildscripts/release.sh @@ -3,5 +3,5 @@ #------------------ # CONTAINER VARIABLES #------------------ -export IMAGE_VERSION=1.3.2 +export IMAGE_VERSION=1.4.2 export BUILD_BRANCH=$(git branch | grep -e "^*" | cut -d' ' -f 2) diff --git a/scripts/backup b/scripts/backup index 8362221..2280b99 100755 --- a/scripts/backup +++ b/scripts/backup @@ -6,8 +6,15 @@ set -o errexit source /opt/volumerize/base.sh +DUPLICITY_RETURN_CODE=0 + +function backup() { + ${DUPLICITY_COMMAND} $@ ${DUPLICITY_OPTIONS} ${VOLUMERIZE_INCUDES} ${VOLUMERIZE_SOURCE} ${VOLUMERIZE_TARGET} || DUPLICITY_RETURN_CODE=$? && true ; +} + ${VOLUMERIZE_SCRIPT_DIR}/prepoststrategy preAction backup source ${VOLUMERIZE_SCRIPT_DIR}/stopContainers.sh -${DUPLICITY_COMMAND} $@ ${DUPLICITY_OPTIONS} ${VOLUMERIZE_INCUDES} ${VOLUMERIZE_SOURCE} ${VOLUMERIZE_TARGET} || true +backup $@ source ${VOLUMERIZE_SCRIPT_DIR}/startContainers.sh ${VOLUMERIZE_SCRIPT_DIR}/prepoststrategy postAction backup +exit $DUPLICITY_RETURN_CODE diff --git a/scripts/backupFull b/scripts/backupFull index 129ae02..58e333b 100755 --- a/scripts/backupFull +++ b/scripts/backupFull @@ -6,8 +6,15 @@ set -o errexit source /opt/volumerize/base.sh +DUPLICITY_RETURN_CODE=0 + +function backupFull() { + ${DUPLICITY_COMMAND} full $@ ${DUPLICITY_OPTIONS} ${VOLUMERIZE_INCUDES} ${VOLUMERIZE_SOURCE} ${VOLUMERIZE_TARGET} || DUPLICITY_RETURN_CODE=$? && true ; +} + ${VOLUMERIZE_SCRIPT_DIR}/prepoststrategy preAction backup source ${VOLUMERIZE_SCRIPT_DIR}/stopContainers.sh -${DUPLICITY_COMMAND} full $@ ${DUPLICITY_OPTIONS} ${VOLUMERIZE_INCUDES} ${VOLUMERIZE_SOURCE} ${VOLUMERIZE_TARGET} || true +backupFull $@ source ${VOLUMERIZE_SCRIPT_DIR}/startContainers.sh ${VOLUMERIZE_SCRIPT_DIR}/prepoststrategy postAction backup +exit $DUPLICITY_RETURN_CODE diff --git a/scripts/backupIncremental b/scripts/backupIncremental index cc0073d..30bbabb 100755 --- a/scripts/backupIncremental +++ b/scripts/backupIncremental @@ -6,8 +6,15 @@ set -o errexit source /opt/volumerize/base.sh +DUPLICITY_RETURN_CODE=0 + +function backupIncremental() { + ${DUPLICITY_COMMAND} incremental $@ ${DUPLICITY_OPTIONS} ${VOLUMERIZE_INCUDES} ${VOLUMERIZE_SOURCE} ${VOLUMERIZE_TARGET} || DUPLICITY_RETURN_CODE=$? && true ; +} + ${VOLUMERIZE_SCRIPT_DIR}/prepoststrategy preAction backup source ${VOLUMERIZE_SCRIPT_DIR}/stopContainers.sh -${DUPLICITY_COMMAND} incremental $@ ${DUPLICITY_OPTIONS} ${VOLUMERIZE_INCUDES} ${VOLUMERIZE_SOURCE} ${VOLUMERIZE_TARGET} || true +backupIncremental $@ source ${VOLUMERIZE_SCRIPT_DIR}/startContainers.sh ${VOLUMERIZE_SCRIPT_DIR}/prepoststrategy postAction backup +exit $DUPLICITY_RETURN_CODE diff --git a/scripts/periodicBackup b/scripts/periodicBackup index 495fa1d..50cadd0 100755 --- a/scripts/periodicBackup +++ b/scripts/periodicBackup @@ -6,8 +6,15 @@ set -o errexit source /opt/volumerize/base.sh +DUPLICITY_RETURN_CODE=0 + +function periodicBackup() { + ${DUPLICITY_COMMAND} $@ ${DUPLICITY_MODE} ${DUPLICITY_OPTIONS} ${VOLUMERIZE_INCUDES} ${VOLUMERIZE_SOURCE} ${VOLUMERIZE_TARGET} || DUPLICITY_RETURN_CODE=$? && true ; +} + ${VOLUMERIZE_SCRIPT_DIR}/prepoststrategy preAction backup source ${VOLUMERIZE_SCRIPT_DIR}/stopContainers.sh -${DUPLICITY_COMMAND} $@ ${DUPLICITY_MODE} ${DUPLICITY_OPTIONS} ${VOLUMERIZE_INCUDES} ${VOLUMERIZE_SOURCE} ${VOLUMERIZE_TARGET} +periodicBackup $@ source ${VOLUMERIZE_SCRIPT_DIR}/startContainers.sh ${VOLUMERIZE_SCRIPT_DIR}/prepoststrategy postAction backup +exit $DUPLICITY_RETURN_CODE diff --git a/scripts/restore b/scripts/restore index d3272bf..fd8312f 100755 --- a/scripts/restore +++ b/scripts/restore @@ -6,8 +6,15 @@ set -o errexit source /opt/volumerize/base.sh +DUPLICITY_RETURN_CODE=0 + +function restore() { + ${DUPLICITY_COMMAND} restore --force $@ ${DUPLICITY_OPTIONS} ${VOLUMERIZE_INCUDES} ${VOLUMERIZE_TARGET} ${VOLUMERIZE_SOURCE} || DUPLICITY_RETURN_CODE=$? && true ; +} + ${VOLUMERIZE_SCRIPT_DIR}/prepoststrategy preAction restore source ${VOLUMERIZE_SCRIPT_DIR}/stopContainers.sh -${DUPLICITY_COMMAND} restore --force $@ ${DUPLICITY_OPTIONS} ${VOLUMERIZE_INCUDES} ${VOLUMERIZE_TARGET} ${VOLUMERIZE_SOURCE} || true +restore $@ source ${VOLUMERIZE_SCRIPT_DIR}/startContainers.sh ${VOLUMERIZE_SCRIPT_DIR}/prepoststrategy postAction restore +exit $DUPLICITY_RETURN_CODE