aboutsummaryrefslogtreecommitdiff
path: root/handlers/dup.in
diff options
context:
space:
mode:
authorOlivier Berger <olivier.berger@it-sudparis.eu>2010-05-02 17:40:50 +0200
committerOlivier Berger <olivier.berger@it-sudparis.eu>2010-05-02 17:45:02 +0200
commitabf7a4bb651c5ec85306fca96a572dfc8a424edb (patch)
tree1b4590835e0082f520acf417877c977c6f4218e0 /handlers/dup.in
parent4f4ee9b0d9fe404b9a126c5eb05d81da695b7cda (diff)
downloadbackupninja-abf7a4bb651c5ec85306fca96a572dfc8a424edb.tar.gz
backupninja-abf7a4bb651c5ec85306fca96a572dfc8a424edb.tar.bz2
Implement Debian #535996 to use --full-if-older-than
Diffstat (limited to 'handlers/dup.in')
-rw-r--r--handlers/dup.in14
1 files changed, 7 insertions, 7 deletions
diff --git a/handlers/dup.in b/handlers/dup.in
index 0b14ef9..16b5af2 100644
--- a/handlers/dup.in
+++ b/handlers/dup.in
@@ -24,6 +24,7 @@ getconf exclude
setsection dest
getconf incremental yes
+getconf increments 30
getconf keep 60
getconf desturl
getconf awsaccesskeyid
@@ -164,14 +165,13 @@ if [ "$incremental" == "no" ]; then
execstr_command="full"
fi
else
- if [ "$keep" != "yes" ]; then
- fullifolderthan="30D"
- if [ "`echo $keep | tr -d 0-9`" == "" ]; then
- #let "fullifolderthan = keep / 2"
- fullifolderthan=$(($keep / 2))
- fullifolderthan="${fullifolderthan}D"
+ # we're in incremental mode
+ if [ "$increments" != "keep" ]; then
+ # if we don't want to keep every increments
+ if [ "`echo $increments | tr -d 0-9`" == "" ]; then
+ increments="${increments}D"
fi
- execstr_options="${execstr_options} --full-if-older-than $fullifolderthan"
+ execstr_options="${execstr_options} --full-if-older-than $increments"
fi
fi