Prune old archives

This commit is contained in:
2024-08-12 22:17:36 +02:00
parent 36798f9cf4
commit 14ac2d9763
3 changed files with 4 additions and 2 deletions

View File

@@ -47,6 +47,7 @@ if [ "$ACTION" = "initialize" ]; then
borg init --encryption=repokey "$TARGET"
elif [ "$ACTION" = "backup" ]; then
borg create --stats "$MOUNTPOINT::"'{now}' "$TARGET"
borg prune --list --show-rc --keep-daily 7 --keep-weekly 4 --keep-monthly 3 "$MOUNTPOINT"
borg list "$MOUNTPOINT"
fi