Skip to content
Snippets Groups Projects
Commit aaa53a78 authored by rhatto's avatar rhatto Committed by intrigeri
Browse files

Allow disabling rotation or setting 2 days as minimum for backup increments in...

Allow disabling rotation or setting 2 days as minimum for backup increments in rsync short format (Issue #2107)
parent 10d67587
Branches
Tags
No related merge requests found
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
# mountpoint = backup partition mountpoint or backup main folder (either local or remote) # 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) # 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) # 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 # keepdaily = for long storage format, specify the number of daily backup increments
# keepweekly = for long storage format, specify the number of weekly 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 # keepmonthly = for long storage format, specify the number of monthly backup increments
...@@ -290,9 +290,9 @@ function rotate_short { ...@@ -290,9 +290,9 @@ function rotate_short {
local keep="$2" local keep="$2"
local metadata="`dirname $folder`/metadata" local metadata="`dirname $folder`/metadata"
if [[ "$keep" -lt 4 ]]; then # No rotations
error "Rotate: minimum of 4 rotations" if [[ "$keep" -lt 1 ]]; then
exit 1 return
fi fi
if [ -d $folder.$keep ]; then if [ -d $folder.$keep ]; then
...@@ -325,9 +325,9 @@ function rotate_short_remote { ...@@ -325,9 +325,9 @@ function rotate_short_remote {
local metadata="`dirname $folder`/metadata" local metadata="`dirname $folder`/metadata"
local keep="$2" local keep="$2"
if [[ "$2" -lt 4 ]]; then # No rotations
error "Rotate: minimum of 4 rotations" if [[ "$keep" -lt 1 ]]; then
exit 1 return
fi fi
( (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment