diff --git a/README.md b/README.md index 7397feb..88ff20b 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ Drops of glue between [SSHFS](https://github.com/libfuse/sshfs), [Borg](https:// - Encrypted, deduplicated backups thanks to Borg - Backup of specified directories to SSHFS - Daily cron scheduler +- Auto-prune old archives ## Usage @@ -18,7 +19,7 @@ Then either run `sudo tupper backup` or wait for the daily cron scheduler to kic ## Building -`dpkg-deb --build . tupper_0.1_all.deb` +`dpkg-deb --build . tupper_0.2_all.deb` ## TODO / Known pitfalls diff --git a/usr/sbin/tupper b/usr/sbin/tupper index 4a9ed94..6425010 100755 --- a/usr/sbin/tupper +++ b/usr/sbin/tupper @@ -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