GCP CloudSQL Automated Database Backups
Introduction
GCP Cloud SQL automated backups are a fully managed service feature that is crucial for data availability and integrity and helps organizations address key requirements.
References
POSTGRES https://cloud.google.com/sql/docs/postgres/backup-recovery/backups
MSSQL https://cloud.google.com/sql/docs/sqlserver/backup-recovery/backups
1. Cloud SQL Automated Backup
Cloud SQL performs automated backups based on a schedule you configure for your instance.
-
Daily Scheduling: You set a 4-hour backup window (e.g., 2:00 AM to 6:00 AM UTC). The backup operation starts sometime during this window when instance activity is typically low.
-
Incremental Backups: Backups are incremental after the initial full backup. This means subsequent backups only contain the data that has changed since the previous backup, which makes them faster to create and reduces storage consumption.
-
Transaction Logs (Binary Logs): To support
Point-in-Time Recovery(PITR), Cloud SQL also continuously captures transaction logs (binlogs). This log data is retained for a configurable period (up to 7 days by default, or up to 365 days for some database types) and is essential for restoring the database to any specific moment within the retention window, not just the time of the last daily backup. -
Storage and Durability: Backups are stored in Google Cloud Storage (GCS), which is designed for high durability (99.999999999% annual durability).
-
Encryption: All backups are encrypted at rest by default using Google-managed encryption keys. You can also opt for Customer-Managed Encryption Keys (CMEK) for greater control over the encryption process and key lifecycle.
-
Location: Backups are stored in a default location (multi-region or regional) or a custom location you specify, allowing you to meet regional data sovereignty or disaster recovery requirements.