(Closes: #396578)
rdiff:
. Added cstream support to allow for bandwidth limiting
+ . Handle "keep = yes" to disable old backups removal (Closes: #424633)
rub
. Fixed typo in rub handler that caused it to not work
. Changed to use lib/vserver code
# how many days of data to keep
# (you can also use the time format of rdiff-backup, e.g. 6D5h)
+# (to keep everything, set this to yes)
+#keep = yes
keep = 60
# A few notes about includes and excludes:
### REMOVE OLD BACKUPS ###
-if [ "`echo $keep | tr -d 0-9`" == "" ]; then
+if [ "$keep" != yes ]; then
+
+ if [ "`echo $keep | tr -d 0-9`" == "" ]; then
# add D if no other date unit is specified
- keep="${keep}D"
-fi
+ keep="${keep}D"
+ fi
-removestr="$RDIFFBACKUP $options --force --remove-older-than $keep "
-if [ "$desttype" == "remote" ]; then
- removestr="${removestr}${destuser}@${desthost}::"
-fi
-removestr="${removestr}${destdir}/${label}";
+ removestr="$RDIFFBACKUP $options --force --remove-older-than $keep "
+ if [ "$desttype" == "remote" ]; then
+ removestr="${removestr}${destuser}@${desthost}::"
+ fi
+ removestr="${removestr}${destdir}/${label}";
+
+ debug "$removestr"
+ if [ $test = 0 ]; then
+ output="`su -c "$removestr" 2>&1`"
+ if [ $? = 0 ]; then
+ debug $output
+ info "Removing backups older than $keep days succeeded."
+ else
+ warning $output
+ warning "Failed removing backups older than $keep."
+ fi
+ fi
-debug "$removestr"
-if [ $test = 0 ]; then
- output="`su -c "$removestr" 2>&1`"
- if [ $? = 0 ]; then
- debug $output
- info "Removing backups older than $keep days succeeded."
- else
- warning $output
- warning "Failed removing backups older than $keep."
- fi
fi
# Add cstream