> ## Documentation Index
> Fetch the complete documentation index at: https://www.aptible.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# aptible backup_retention_policy:set

This command changes the
[backup retention policy](/docs/core-concepts/managed-databases/managing-databases/database-backups#automatic-backups)
for an [Environment](/docs/core-concepts/architecture/environments). Only the
specified attributes will be changed. The rest will reuse the current value.

# Synopsis

```
Usage:
  aptible backup_retention_policy:set [ENVIRONMENT] [flags]

Flags:
      --daily int32          Number of daily backups to retain (default -1)
  -e, --env string           Environment handle (alias)
      --environment string   Environment handle
      --force                Skip confirmation when reducing backup counts
      --keep-final           Keep final backup when deprovisioning
      --make-copy            Make a copy of backups
      --monthly int32        Number of monthly backups to retain (default -1)
      --no-keep-final        Do not keep final backup when deprovisioning
      --no-make-copy         Do not make copies of backups
      --yearly int32         Number of yearly backups to retain (default -1)
```
