rsync rotations not being correctly processed
It seems that rsync handler fails when checking if current rotation days is greater than 4. I have a simple rsync config file:
[general] mountpoint = /mnt/LaCie days = 30 [source] from = local include = /etc
backupninja complains about my rotation configuration:
Error: Rotate: minimum of 4 rotations
The problem is located in the rotate function, it does a comparison like this:
(Note: Redmine is formatting square brackets)
if [[ "$2" < 4 ]]; then error "Rotate: minimum of 4 rotations" exit 1 fi
Integer comparison should be done with @-lt@:
$ if [[ 30 < 4 ]]; then echo wrong; fi wrong $ if [[ 30 -lt 4 ]]; then echo wrong; fi $
(from redmine: created on 2009-11-30, closed on 2009-12-02)