Google Cloud Professional Cloud Database Engineer — Question 106
You are running a transactional application on Cloud SQL for PostgreSQL in Google Cloud. The database is running in a high availability configuration within one region. You have encountered issues with data and want to restore to the last known pristine version of the database. What should you do?
Answer options
- A. Create a clone database from a read replica database, and restore the clone in the same region.
- B. Create a clone database from a read replica database, and restore the clone into a different zone.
- C. Use the Cloud SQL point-in-time recovery (PITR) feature. Restore the copy from two hours ago to a new database instance.
- D. Use the Cloud SQL database import feature. Import last week's dump file from Cloud Storage.
Correct answer: C
Explanation
The correct choice is C because the Cloud SQL point-in-time recovery (PITR) feature allows you to restore the database to a specific moment, which is ideal for reverting to a pristine version. Options A and B involve creating clones from read replicas, which do not specifically target restoring to a previous state. Option D suggests importing a dump file, which may not reflect the exact state of the database as of two hours ago.