From dbeb79980f5f056d14f2250ca0c0374d3ee8e6c5 Mon Sep 17 00:00:00 2001 From: deajan Date: Mon, 8 Aug 2016 00:23:48 +0200 Subject: [PATCH] Rebuilt targets --- dev/debug_obackup.sh | 30 +++++++++++++++--------------- obackup.sh | 28 ++++++++++++++-------------- 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/dev/debug_obackup.sh b/dev/debug_obackup.sh index 1d93517..d6d5229 100755 --- a/dev/debug_obackup.sh +++ b/dev/debug_obackup.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -#TODO: rework IFS= statements +#TODO: rework old IFS= statements ###### Remote push/pull (or local) backup script for files & databases @@ -8,12 +8,12 @@ PROGRAM="obackup" AUTHOR="(C) 2013-2016 by Orsiris de Jong" CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr" PROGRAM_VERSION=2.1-dev -PROGRAM_BUILD=2016080701 +PROGRAM_BUILD=2016080703 IS_STABLE=yes #### MINIMAL-FUNCTION-SET BEGIN #### -## FUNC_BUILD=2016080701 +## FUNC_BUILD=2016080702 ## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr #TODO: set _LOGGER_PREFIX in other apps, specially for osync daemon mode @@ -585,7 +585,7 @@ function WaitForTaskCompletion { local counting="{6:-true}" # Count time since function launch if true, script launch if false Logger "${FUNCNAME[0]} called by [$caller_name]." "PARANOIA_DEBUG" #__WITH_PARANOIA_DEBUG - __CheckArguments 5 $# ${FUNCNAME[0]} "$@" #__WITH_PARANOIA_DEBUG + __CheckArguments 6 $# ${FUNCNAME[0]} "$@" #__WITH_PARANOIA_DEBUG local soft_alert=0 # Does a soft alert need to be triggered, if yes, send an alert once local log_ttime=0 # local time instance for comparaison @@ -2210,11 +2210,11 @@ function FilesBackup { # Backup non recursive directories #for BACKUP_TASK in $FILE_BACKUP_TASKS #do - Logger "Beginning file backup of [$BACKUP_TASK]." "NOTICE" + Logger "Beginning file backup of [$backupTask]." "NOTICE" if [ "$ENCRYPTION" == "yes" ]; then - Duplicity "$BACKUP_TASK" "recurse" + Duplicity "$backupTask" "recurse" else - Rsync "$BACKUP_TASK" "recurse" + Rsync "$backupTask" "recurse" fi CheckTotalExecutionTime done @@ -2225,11 +2225,11 @@ function FilesBackup { ## Backup files at root of DIRECTORIES_RECURSE_LIST directories #for BACKUP_TASK in $RECURSIVE_DIRECTORY_LIST #do - Logger "Beginning non recursive file backup of [$BACKUP_TASK]." "NOTICE" + Logger "Beginning non recursive file backup of [$backupTask]." "NOTICE" if [ "$ENCRYPTION" == "yes" ]; then - Duplicity "$BACKUP_TASK" "no-recurse" + Duplicity "$backupTask" "no-recurse" else - Rsync "$BACKUP_TASK" "no-recurse" + Rsync "$backupTask" "no-recurse" fi CheckTotalExecutionTime done @@ -2240,11 +2240,11 @@ function FilesBackup { # Backup sub directories of recursive directories #for BACKUP_TASK in $FILE_RECURSIVE_BACKUP_TASKS #do - Logger "Beginning recursive file backup of [$BACKUP_TASK]." "NOTICE" + Logger "Beginning recursive file backup of [$backupTask]." "NOTICE" if [ "$ENCRYPTION" == "yes" ]; then - Duplicity "$BACKUP_TASK" "recurse" + Duplicity "$backupTask" "recurse" else - Rsync "$BACKUP_TASK" "recurse" + Rsync "$backupTask" "recurse" fi CheckTotalExecutionTime done @@ -2256,11 +2256,11 @@ function CheckTotalExecutionTime { #### Check if max execution time of whole script as been reached if [ $SECONDS -gt $SOFT_MAX_EXEC_TIME_TOTAL ]; then - Logger "Max soft execution time of the whole backup exceeded while backing up [$BACKUP_TASK]." "ERROR" + Logger "Max soft execution time of the whole backup exceeded." "ERROR" WARN_ALERT=1 SendAlert if [ $SECONDS -gt $HARD_MAX_EXEC_TIME_TOTAL ] && [ $HARD_MAX_EXEC_TIME_TOTAL -ne 0 ]; then - Logger "Max hard execution time of the whole backup exceeded while backing up [$BACKUP_TASK], stopping backup process." "CRITICAL" + Logger "Max hard execution time of the whole backup exceeded, stopping backup process." "CRITICAL" exit 1 fi fi diff --git a/obackup.sh b/obackup.sh index 6af70bb..1e1cce2 100755 --- a/obackup.sh +++ b/obackup.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -#TODO: rework IFS= statements +#TODO: rework old IFS= statements ###### Remote push/pull (or local) backup script for files & databases @@ -8,12 +8,12 @@ PROGRAM="obackup" AUTHOR="(C) 2013-2016 by Orsiris de Jong" CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr" PROGRAM_VERSION=2.1-dev -PROGRAM_BUILD=2016080701 +PROGRAM_BUILD=2016080703 IS_STABLE=yes #### MINIMAL-FUNCTION-SET BEGIN #### -## FUNC_BUILD=2016080701 +## FUNC_BUILD=2016080702 ## BEGIN Generic functions for osync & obackup written in 2013-2016 by Orsiris de Jong - http://www.netpower.fr - ozy@netpower.fr #TODO: set _LOGGER_PREFIX in other apps, specially for osync daemon mode @@ -2110,11 +2110,11 @@ function FilesBackup { # Backup non recursive directories #for BACKUP_TASK in $FILE_BACKUP_TASKS #do - Logger "Beginning file backup of [$BACKUP_TASK]." "NOTICE" + Logger "Beginning file backup of [$backupTask]." "NOTICE" if [ "$ENCRYPTION" == "yes" ]; then - Duplicity "$BACKUP_TASK" "recurse" + Duplicity "$backupTask" "recurse" else - Rsync "$BACKUP_TASK" "recurse" + Rsync "$backupTask" "recurse" fi CheckTotalExecutionTime done @@ -2125,11 +2125,11 @@ function FilesBackup { ## Backup files at root of DIRECTORIES_RECURSE_LIST directories #for BACKUP_TASK in $RECURSIVE_DIRECTORY_LIST #do - Logger "Beginning non recursive file backup of [$BACKUP_TASK]." "NOTICE" + Logger "Beginning non recursive file backup of [$backupTask]." "NOTICE" if [ "$ENCRYPTION" == "yes" ]; then - Duplicity "$BACKUP_TASK" "no-recurse" + Duplicity "$backupTask" "no-recurse" else - Rsync "$BACKUP_TASK" "no-recurse" + Rsync "$backupTask" "no-recurse" fi CheckTotalExecutionTime done @@ -2140,11 +2140,11 @@ function FilesBackup { # Backup sub directories of recursive directories #for BACKUP_TASK in $FILE_RECURSIVE_BACKUP_TASKS #do - Logger "Beginning recursive file backup of [$BACKUP_TASK]." "NOTICE" + Logger "Beginning recursive file backup of [$backupTask]." "NOTICE" if [ "$ENCRYPTION" == "yes" ]; then - Duplicity "$BACKUP_TASK" "recurse" + Duplicity "$backupTask" "recurse" else - Rsync "$BACKUP_TASK" "recurse" + Rsync "$backupTask" "recurse" fi CheckTotalExecutionTime done @@ -2155,11 +2155,11 @@ function CheckTotalExecutionTime { #### Check if max execution time of whole script as been reached if [ $SECONDS -gt $SOFT_MAX_EXEC_TIME_TOTAL ]; then - Logger "Max soft execution time of the whole backup exceeded while backing up [$BACKUP_TASK]." "ERROR" + Logger "Max soft execution time of the whole backup exceeded." "ERROR" WARN_ALERT=1 SendAlert if [ $SECONDS -gt $HARD_MAX_EXEC_TIME_TOTAL ] && [ $HARD_MAX_EXEC_TIME_TOTAL -ne 0 ]; then - Logger "Max hard execution time of the whole backup exceeded while backing up [$BACKUP_TASK], stopping backup process." "CRITICAL" + Logger "Max hard execution time of the whole backup exceeded, stopping backup process." "CRITICAL" exit 1 fi fi