For AI agents: A markdown version of this page is available at https://docs.datadoghq.com/security/default_rules/def-000-yxc.md. A documentation index is available at /llms.txt.

SQL database instances should have automated backups enabled

Description

This check ensures that Cloud SQL database instances are configured with automated backups. It is recommended that all SQL database instances enable automated backups to provide a way to restore an instance and recover lost data. This recommendation applies to SQL Server, PostgreSQL, MySQL Generation 1, and MySQL Generation 2 instances.

Automated backups are essential for protecting data from loss or damage, although they increase the required storage size and associated costs. This check skips read replicas, read pools, and on-premises instances (READ_REPLICA_INSTANCE, READ_POOL_INSTANCE, and ON_PREMISES_INSTANCE), because Cloud SQL does not run automated backups for them. It also skips green instances (GREEN_INSTANCE): a green instance is the staging clone in a blue-green deployment, functions as a read replica of the primary, and becomes the production instance only at switchover. An instance with a missing or unspecified instance type fails, because its scope cannot be determined.

Remediation

To enable automated backups, follow the instructions for your database engine: MySQL, PostgreSQL, or SQL Server.