Understanding Retention
What is retention?
Retention defines how long a backup is kept before it can be overwritten or deleted. It’s the bridge between “we have enough storage” and “we can still restore last month’s data.”
In Bareos, retention is set per pool and applies to volumes. When a volume’s retention expires, it becomes eligible for recycling — its space can be reused for new backups.
Why retention matters
Too short = no recovery points when you need them. Too long = storage fills up faster than expected.
| Retention | Storage impact | Recovery window |
|---|---|---|
| 7 days | Low | Last week only |
| 30 days | Medium | Last month |
| 90 days | High | Last quarter |
| 365 days | Very high | Last year |
Most regulatory environments require 30-90 days. Some industries require years.
How retention works in Bareos
Bareos tracks three types of retention:
File Retention
How long individual file entries are kept in the catalog. After expiry, you can no longer browse individual files in the backup — but the backup data itself is still on the volume.
Job Retention
How long job records are kept in the catalog. After expiry, the job metadata disappears from the catalog, but the volume data may still exist.
Volume Retention
How long a volume is kept before it can be recycled. This is the critical one for storage — when volume retention expires, Bareos can reuse the space.
The relationship:
File Retention <= Job Retention <= Volume Retention
File entries expire first, then job records, then the volume itself.
Choosing the right retention
Start with the question: “What’s the oldest data I might need to restore?”
| Scenario | Suggested retention |
|---|---|
| Development servers | 7-14 days |
| Office file servers | 30-60 days |
| Database servers | 30-90 days |
| Financial systems | 1-7 years |
| Healthcare records | 7-10 years |
Then consider storage:
Longer retention = more storage. The relationship isn’t linear — it depends on your backup levels and change rates:
- Full + Daily Incremental, 30-day retention: ~5x the data size
- Full + Daily Incremental, 90-day retention: ~12x the data size
- Monthly Full + Daily Incremental, 365-day retention: ~15x the data size
These are rough estimates. Your actual numbers depend on change rates, compression, and deduplication.
The retention trap
The most common mistake: setting retention without understanding the storage impact. An admin changes retention from 30 to 90 days — and three months later, the pool is full.
This is exactly question 4 of the 5 questions every backup admin asks: “What happens if I change retention?” The ability to simulate retention changes before applying them is planned for Onesimus Enterprise.
Retention vs. recycling
Retention is when a volume becomes eligible for reuse. Recycling is actually reusing it. A volume past retention isn’t automatically deleted — it stays until Bareos needs the space.
This distinction matters: you might have volumes that are past retention but still contain useful data. Smart recycling recommendations (planned for Onesimus Pro) will help identify which volumes are truly safe to reuse.