Backup policies
A backup policy defines when backups run, which instance to copy from, and how many runs to keep. Attach a policy to one or more clusters.
In the console
Choose Databases, Backups Policies.
To create a backup policy
- Choose Databases, Backups Policies, then create a backup policy.
- For Name, enter a name.
- For Cron (execution pattern), enter a cron schedule (for example,
0 0 * * *for daily at midnight). - For Backup source, choose Primary database or Replica database.
- For Number of backups to keep, enter retention count (for example,
7). - Turn on Enabled if the policy should run on schedule.
- Choose Save.
Fields
| Field | Description |
|---|---|
| Name | Display name for the policy |
| Cron | Schedule in cron format |
| Backup source | primary or replica — which member to back up |
| Number of backups to keep | Retention count for completed runs under this policy |
| Enabled | Whether the schedule is active |
To attach a policy to a cluster
- Open the cluster.
- In Backup, for Add backup policy, choose the policy.
- Choose Add.
Confirm Active backup bucket is set. Clusters usually get a bucket when they are created.
To remove a policy from a cluster
- Open the cluster.
- In Active backup policies, choose Remove for the policy.
To edit or delete a policy
- Choose Databases, Backups Policies.
- Open the policy to edit it, or delete it from the list.
Changing policy settings
Editing a backup policy (cron schedule, backup source, retention, or enabled) does not automatically apply those changes to clusters that already have the policy attached. Schedule settings are applied when you attach the policy to a cluster.
To apply updated policy settings to a cluster
- Edit and save the backup policy.
- Open the target cluster.
- In Active backup policies, remove the policy.
- Attach the policy again with Add backup policy.
Important
Until you remove and re-attach the policy, the cluster continues to use the schedule, source, and retention from when the policy was last attached.