aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--handlers/dup.helper.in15
-rw-r--r--handlers/dup.in14
2 files changed, 20 insertions, 9 deletions
diff --git a/handlers/dup.helper.in b/handlers/dup.helper.in
index 8b344dc..4ac33d7 100644
--- a/handlers/dup.helper.in
+++ b/handlers/dup.helper.in
@@ -123,6 +123,7 @@ do_dup_dest() {
formItem "destdir" "$dup_destdir"
formItem "keep" "$dup_keep"
formItem "incremental" "$dup_incremental"
+ formItem "increments" "$dup_increments"
formItem "bandwidthlimit" "$dup_bandwidth"
formItem "sshoptions" "$dup_sshoptions"
formDisplay
@@ -139,8 +140,9 @@ do_dup_dest() {
dup_destdir=${thereply[2]}
dup_keep=${thereply[3]}
dup_incremental=${thereply[4]}
- dup_bandwidth=${thereply[5]}
- dup_sshoptions=${thereply[6]}
+ dup_increments=${thereply[5]}
+ dup_bandwidth=${thereply[6]}
+ dup_sshoptions=${thereply[7]}
done
set +o noglob
@@ -406,6 +408,14 @@ EOF
# if incremental = no, perform a full backup in order to start a new backup set
incremental = $dup_incremental
+# how many days of incremental backups before doing a full backup again ; default is 30 days.
+# (you can also use the time format of duplicity)
+# if 'increments = keep' is set : do not start another full backup,
+# but keep doing incremental backups
+#increments = 30
+#increments = keep
+increments = $dup_increments
+
# how many days of data to keep ; default is 60 days.
# (you can also use the time format of duplicity)
# 'keep = yes' means : do not delete old data, the remote host will take care of this
@@ -510,6 +520,7 @@ dup_wizard() {
dup_excludes=
dup_vsincludes=
dup_incremental=yes
+ dup_increments=30
dup_keep=60
dup_bandwidth=
dup_sshoptions=
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