fix rotation
This commit is contained in:
parent
17b8b1d51d
commit
c4bcbc290f
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
|||||||
|
remote-backup (1.2.2) stable; urgency=low
|
||||||
|
|
||||||
|
* fix rotation
|
||||||
|
|
||||||
|
-- Vincent Riquer <v.riquer@b2f-concept.com> Fri, 03 Feb 2012 10:45:45 +0100
|
||||||
|
|
||||||
remote-backup (1.2.1) stable; urgency=low
|
remote-backup (1.2.1) stable; urgency=low
|
||||||
|
|
||||||
* add TIMEOUT parameter (defaults to 1800 seconds).
|
* add TIMEOUT parameter (defaults to 1800 seconds).
|
||||||
|
|||||||
@ -141,12 +141,12 @@ rotateBackup() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# step 2: shift the snapshots(s) back by one, if they exist
|
# step 2: shift the snapshots(s) back by one, if they exist
|
||||||
for backup_number in {$((${MAX_ROTATE}-1))..0}
|
for (( backup_num=$MAX_ROTATE ; backup_num >= 0 ; backup_num-- ))
|
||||||
do
|
do
|
||||||
if [ -d "$SNAPSHOT_RW/$NAME/daily.${backup_number}" ]
|
if [ -d "$SNAPSHOT_RW/$NAME/daily.${backup_num}" ]
|
||||||
then
|
then
|
||||||
$MV -f "$SNAPSHOT_RW/$NAME/daily.${backup_number}" \
|
$MV -f "$SNAPSHOT_RW/$NAME/daily.${backup_num}" \
|
||||||
"$SNAPSHOT_RW/$NAME/daily.$((${backup_number}+1))"
|
"$SNAPSHOT_RW/$NAME/daily.$(( backup_num + 1 ))"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user