Ensure that your Google Cloud Platform (GCP) Cloud Spanner instances have default backup schedules enabled to automatically protect new databases with scheduled backups. When enabled, Cloud Spanner automatically creates a full backup every 24 hours for all new databases created in the instance, with backups retained for 7 days by default.
excellence
By enabling default backup schedules for Cloud Spanner instances, organizations establish a foundational layer of automated data protection that ensures every new database is protected from day one without requiring manual intervention. This automation significantly reduces the risk of data loss due to human error, oversight, or delayed backup configuration, which are common causes of unprotected databases in production environments. Default backup schedules provide a consistent, predictable backup strategy across all databases in an instance, simplifying backup management and ensuring compliance with organizational data retention policies. Additionally, automated backup schedules reduce operational overhead by eliminating the need for administrators to remember to configure backups for each new database, allowing teams to focus on other critical tasks.
Important: While default backup schedules provide automated baseline protection, they may not meet all organizational requirements for recovery point objectives (RPO) or compliance mandates. Organizations should review and customize default backup schedules based on their specific needs, including adjusting backup frequency, retention periods, and encryption settings.
Audit
To determine if your Cloud Spanner instances have default backup schedules enabled, perform the following operations:
Remediation / Resolution
To enable default backup schedules for your Google Cloud Spanner instances, you must update the instance configuration to set the default backup schedule type to automatic. This can be done for both new instances during creation or for existing instances using the update command. Once enabled, all new databases created in the instance will automatically have a default backup schedule that creates full backups every 24 hours with a 7-day retention period. Perform the following operations:
Important: Enabling default backup schedules on an existing Cloud Spanner instance only affects new databases created after the setting is enabled. Existing databases in the instance will not automatically receive default backup schedules; you must manually create backup schedules for existing databases if they do not already have them. The default backup schedule creates full backups every 24 hours and retains them for 7 days. Organizations with different backup frequency or retention requirements should customize the default schedule after enabling it or create custom backup schedules for specific databases. Default backup schedules can be edited or deleted at any time after creation. Backup schedules incur storage costs based on the size and number of backups retained, so organizations should monitor backup storage usage and costs.References
- Google Cloud Platform (GCP) Documentation
- Default backup schedules
- Edit the default backup schedule type
- Backups overview
- Create and manage backup schedules
- Create and manage instances
- Manage backups
- GCP Command Line Interface (CLI) Documentation
- gcloud spanner instances update
- gcloud spanner instances create
- gcloud spanner instances describe
- gcloud spanner instances list
- gcloud spanner backup-schedules list
- gcloud projects list