What we did
As a drill to confirm that production Cloud SQL (PostgreSQL) can actually be restored to an arbitrary point in time, we created a real clone of it.
gcloud sql instances clone < source-instance > < clone-name > \ --point-in-time= < UTC timestamp, 10 minutes earlier >
Enter fullscreen mode
Exit fullscreen mode
The headline result: Cloud Audit Logs show about 10 minutes from the start of clone creation to completion (08:27:02 β 08:36:51 UTC in this run). We deleted the clone right after verifying it, so it was actually running for about 30 minutes total, at a cost of well under a dollar.
Why this needed to be tested on production
This instance runs with availability_type = "ZONAL" .
module "cloud_sql" { # ... availability_type = "ZONAL" tier = "db-custom-1-3840" deletion_protection = true # ...β¦