# Keep the history you may need.

> Plan backup retention around recovery needs and available storage. Understand local retention, cloud history, encryption-key custody and testing older backups.

Canonical page: https://www.calmbackup.com/guides/backup-retention

Choose a retention policy around recovery needs, available storage and how long it takes to notice a problem.

[Start free trial](https://app.calmbackup.com/register)

## Start with when you might notice.

A backup schedule answers how often you capture data. Retention answers how far back you can go. A fresh backup may include an unwanted deletion or a bad import that nobody has noticed yet. Older recovery points can matter just as much as today’s run.

Consider the incidents your application could face: an immediate server failure, a mistake discovered tomorrow, or an incorrect batch update found during a later review. Choose how much history you need for those situations, then confirm what your service and storage arrangements actually retain.

## Keep local and cloud retention separate.

The CLI’s local\_retention\_days setting controls local encrypted backup files and defaults to seven days. It does not set the cloud retention period. Check the cloud retention terms and available backup history for your account independently.

The CLI prunes eligible older local backups using cloud-confirmed filenames. Do not assume that changing a local setting changes what is retained remotely. Review the oldest available recovery point in each location.

```
local_retention_days: 7
```

**A configuration example, not a universal recommendation**

Seven days is the CLI default. Your application may need a different history window. Match retention to your recovery requirements and available storage.

[Read the configuration reference](https://www.calmbackup.com/docs/configuration)

## Plan for space and key history.

Allow space for the working dump, compressed archive and encrypted local copies. Watch how archive size changes as uploads and database records accumulate. A retention policy that fits today may fill the disk later.

Keep the encryption keys required by every backup you still intend to restore. Replacing a configured key affects new archives; it does not re-encrypt existing ones. Deleting an old key can make retained history unusable.

Review retention after a material change in data volume, backup frequency or recovery expectations. Test an older recovery point as well as the newest one so the history is useful in practice.

[Review encryption key custody](https://www.calmbackup.com/security)
