From 4ee08d08144328cb0a7ed9f4dfd3de4e37d5098d Mon Sep 17 00:00:00 2001 From: deajan Date: Fri, 24 Apr 2015 21:52:40 +0200 Subject: [PATCH] Added conf file equivalent for --dontgetsize --- CHANGELOG.md | 1 + obackup.sh | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 379fd0e..6d1af85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ UNDER WORK CHANGELOG --------- +- Added a config file option equivalent to --dontgetsize - Added basic install script from osync project - Added obackup-batch.sh from osync project to rerun failed backups in row - Delta copy algorithm is now used even for local copies (usefull for network drives), this can be overriden in config file diff --git a/obackup.sh b/obackup.sh index a24144c..d3597ae 100755 --- a/obackup.sh +++ b/obackup.sh @@ -5,7 +5,7 @@ AUTHOR="(L) 2013-2015 by Orsiris \"Ozy\" de Jong" CONTACT="http://www.netpower.fr/obackup - ozy@netpower.fr" PROGRAM_VERSION=1.9pre -PROGRAM_BUILD=2004201501 +PROGRAM_BUILD=2404201502 ## type doesn't work on platforms other than linux (bash). If if doesn't work, always assume output is not a zero exitcode if ! type -p "$BASH" > /dev/null @@ -1249,7 +1249,7 @@ function Init fi ## Set Rsync arguments - RSYNC_ARGS=-rlptgoD + RSYNC_ARGS=-rlptgoDu if [ "$PRESERVE_ACL" == "yes" ] then RSYNC_ARGS=$RSYNC_ARGS"A" @@ -1299,6 +1299,13 @@ function Init RSYNC_ARGS=$RSYNC_ARGS" --delete" fi + if [ "$DELTA_COPIES" != "no" ] + then + RSYNC_ARGS=$RSYNC_ARGS" --no-whole-file" + else + RSYNC_ARGS=$RSYNC_ARGS" --whole-file" + fi + if [ $stats -eq 1 ] then RSYNC_ARGS=$RSYNC_ARGS" --stats" @@ -1389,7 +1396,7 @@ function Main if [ "$BACKUP_FILES" != "no" ] then ListDirectories - if [ "$dontgetsize" -ne 1 ] + if [ "$dontgetsize" -ne 1 ] || [ "$DONT_GET_BACKUP_FILE_SIZE" == "no" ] then GetDirectoriesSize fi