From 4f4ee9b0d9fe404b9a126c5eb05d81da695b7cda Mon Sep 17 00:00:00 2001
From: olivier <olivier@olivierberger.com>
Date: Sun, 2 May 2010 12:05:10 +0200
Subject: [PATCH] Add full-if-older-than with half the keep duration

---
 handlers/dup.in | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/handlers/dup.in b/handlers/dup.in
index c8930176..0b14ef91 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
-- 
GitLab