Menu

gcloud sql clone point-in-time: a Real Restore Drill
πŸ“°

gcloud sql clone point-in-time: a Real Restore Drill

DEV Community: postgresΒ·cometa-kaitoΒ·6 days ago
#NusSZiEz
#devtopostgresql#devto#dev#clone#actually
Long article (524 words) β€” no AI summary yet.
Reading 0:00
15s threshold

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 # ...…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.