Ensure that Point-in-Time Recovery (PITR) feature is enabled for all MySQL database instances deployed within your Google Cloud Platform (GCP) account, in order to allow you to recover data from a specific point in time at a minimal cost. Automated backups, along with binary logging, must be enabled for your MySQL database instances before you can turn on Point-in-Time Recovery.
Point-in-Time Recovery (PITR) helps you recover a Google Cloud MySQL database instance to a specific point in time, down to a fraction of a second. This feature is extremely useful in case an error causes a loss of data or the database gets corrupted, as you can recover your database to its working state (before the error occurred).
Audit
To determine if your Google Cloud MySQL database instances have Point-in-Time Recovery feature enabled, perform the following actions:
Remediation / Resolution
To enable and configure Point-in-Time Recovery (PITR) for your Google Cloud MySQL database instances, perform the following actions:
References
- Google Cloud Platform (GCP) Documentation
- Cloud SQL for MySQL
- Overview of backups
- PostgreSQL Database Documentation
- 20.1 Binary Log Overview
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
- gcloud sql instances list
- gcloud sql instances describe
- gcloud sql instances patch