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.

RetentionStorage impactRecovery window
7 daysLowLast week only
30 daysMediumLast month
90 daysHighLast quarter
365 daysVery highLast 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?”

ScenarioSuggested retention
Development servers7-14 days
Office file servers30-60 days
Database servers30-90 days
Financial systems1-7 years
Healthcare records7-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.

Learn about pools and how they organize your storage →