Retention and maintenance
Retention decides which archives survive over time. Prune removes archives outside the policy; compact reclaims the storage they no longer reference.
Confirm that recent backups and a test restore work before removing archives. A pruned archive cannot be recovered through BorgMate.
Build a retention policy
Enable only the rules you need. Borg keeps an archive when it is selected by any enabled rule; overlapping rules do not create extra copies.
This is a reasonable example, not a universal policy. Increase the counts when files change frequently or when long discovery delays matter. Storage growth depends on changed data because Borg deduplicates content.
Available rules
| Rule | What it preserves |
|---|---|
| Keep last | The newest N archives regardless of calendar interval. |
| Hourly | One archive for each of the newest N hourly intervals. |
| Daily | One archive for each of the newest N daily intervals. |
| Weekly | One archive for each of the newest N weekly intervals. |
| Monthly | One archive for each of the newest N monthly intervals. |
| Yearly | One archive for each of the newest N yearly intervals. |
At least one rule must be enabled before Prune is available. Compact repository after prune is enabled by default and should normally remain enabled.
Recommended maintenance workflow
- Complete a fresh backup.
- Restore and open a representative test file.
- Review the retention rules and archive dates.
- Run Prune.
- Let the configured compact step finish.
- Run Check periodically and after storage or transport problems.
Maintenance actions
| Action | Effect | Repository data |
|---|---|---|
| Delete archive | Removes one selected archive. | Destructive |
| Prune | Removes archives not retained by the configured rules. | Destructive |
| Compact | Reclaims unused repository segments after archive removal. | Changes storage layout |
| Check | Verifies repository integrity and reports problems. | Verification |
| Change Passphrase | Changes the passphrase protecting the Borg encryption key and updates the OS keychain. | Credentials change |
| Duplicate | Copies the BorgMate configuration under a new name. | No change |
| Remove | Removes the entry from BorgMate. | No change |
Change a passphrase
- Select the repository and choose More → Change Passphrase.
- Enter the new passphrase twice.
- Keep saving to the system keychain enabled unless you prefer a prompt for every operation.
- After completion, update the separate disaster-recovery copy of the passphrase.
The action is unavailable for unencrypted repositories. Changing the passphrase does not turn an unencrypted repository into an encrypted one.