diff options
author | olivier <olivier@olivierberger.com> | 2010-05-02 12:05:10 +0200 |
---|---|---|
committer | olivier <olivier@olivierberger.com> | 2010-05-02 12:05:15 +0200 |
commit | 4f4ee9b0d9fe404b9a126c5eb05d81da695b7cda (patch) | |
tree | 04aab7db17d4e980ba2c4960eecf8ec679fb1f49 | |
parent | 582b7521cba4391845c167037cc1d362c7e76bd3 (diff) | |
download | backupninja-4f4ee9b0d9fe404b9a126c5eb05d81da695b7cda.tar.gz backupninja-4f4ee9b0d9fe404b9a126c5eb05d81da695b7cda.tar.bz2 |
Add full-if-older-than with half the keep duration
-rw-r--r-- | handlers/dup.in | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/handlers/dup.in b/handlers/dup.in index c893017..0b14ef9 100644 --- a/handlers/dup.in +++ b/handlers/dup.in @@ -163,6 +163,16 @@ if [ "$incremental" == "no" ]; then else 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" + fi + execstr_options="${execstr_options} --full-if-older-than $fullifolderthan" + fi fi ### Cleanup options |