Skip to content

Commit 9b6a82d

Browse files
committed
fix(remote-backup.sh): old backups weren't deleted before. Configure to keep last 3 full backups only.
We keep last 3 full backups that means we have backups for last 3 months. See also: https://lists.gnu.org/archive/html/duplicity-talk/2017-03/msg00017.html Fix #1155 [skip ci]
1 parent ca4a889 commit 9b6a82d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vagrant/provisioning/roles/mystamps-backup/templates/remote-backup.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ case "${1:-}" in
2020
su mystamps 2>&1 \
2121
-c "${DUPLICITY_CMD} --name=uploads --no-encryption /data/uploads ${UPLOADS_DST}"
2222
su mystamps 2>&1 \
23-
-c "duplicity remove-older-than 6M ${UPLOADS_DST}"
23+
-c "duplicity remove-all-but-n-full 3 --force ${UPLOADS_DST}"
2424
;;
2525
'mysql-backups')
2626
PASSPHRASE="$PASSPHRASE" su mystamps 2>&1 \
2727
-c "${DUPLICITY_CMD} --name=mysql-backups /data/backups ${MYSQL_BACKUPS_DST}"
28-
PASSPHRASE="$PASSPHRASE" su mystamps 2>&1 \
29-
-c "duplicity remove-older-than 6M ${MYSQL_BACKUPS_DST}"
28+
su mystamps 2>&1 \
29+
-c "duplicity remove-all-but-n-full 3 --force ${MYSQL_BACKUPS_DST}"
3030
;;
3131
*)
3232
echo 2>&1 "Usage: $(dirname "$0") (uploads|mysql-backups)"

0 commit comments

Comments
 (0)