aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2011-05-30 19:22:04 -0300
committerintrigeri <intrigeri@boum.org>2012-01-01 10:45:48 +0100
commitaaa53a78b2757ce0e8d4b18cf96f4d45c2c3ec90 (patch)
tree753d80b11fea2ec04cb1d7eb05df70ecb37ec2a4
parent10d67587efa3f979ea5f9ddca4fff6d2475c3140 (diff)
downloadbackupninja-aaa53a78b2757ce0e8d4b18cf96f4d45c2c3ec90.tar.gz
backupninja-aaa53a78b2757ce0e8d4b18cf96f4d45c2c3ec90.tar.bz2
Allow disabling rotation or setting 2 days as minimum for backup increments in rsync short format (Issue #2107)
-rw-r--r--handlers/rsync.in14
1 files changed, 7 insertions, 7 deletions
diff --git a/handlers/rsync.in b/handlers/rsync.in
index ef0e636..767b6e0 100644
--- a/handlers/rsync.in
+++ b/handlers/rsync.in
@@ -35,7 +35,7 @@
# mountpoint = backup partition mountpoint or backup main folder (either local or remote)
# backupdir = folder relative do $mountpoint where the backup should be stored (local or remote)
# format = specify backup storage format: short, long or mirror (i.e, no rotations)
-# days = for short storage format, specify the number of backup increments (min = 5)
+# days = for short storage format, specify the number of backup increments (min = 2, set to 1 or less to disable)
# keepdaily = for long storage format, specify the number of daily backup increments
# keepweekly = for long storage format, specify the number of weekly backup increments
# keepmonthly = for long storage format, specify the number of monthly backup increments
@@ -290,9 +290,9 @@ function rotate_short {
local keep="$2"
local metadata="`dirname $folder`/metadata"
- if [[ "$keep" -lt 4 ]]; then
- error "Rotate: minimum of 4 rotations"
- exit 1
+ # No rotations
+ if [[ "$keep" -lt 1 ]]; then
+ return
fi
if [ -d $folder.$keep ]; then
@@ -325,9 +325,9 @@ function rotate_short_remote {
local metadata="`dirname $folder`/metadata"
local keep="$2"
- if [[ "$2" -lt 4 ]]; then
- error "Rotate: minimum of 4 rotations"
- exit 1
+ # No rotations
+ if [[ "$keep" -lt 1 ]]; then
+ return
fi
(