Skip to main content

Backups & Redundancy

Exam guide§3.2

Two separate ideas the exam tests: backups (recover from a bad write/delete) and location redundancy (survive a zone or region failure).

Backups per database

NumbersBackup & recovery features
ProductAutomated backupsPoint-in-time recovery (PITR)
Cloud SQLYes, scheduled + on-demandYes (via binary/WAL logs)
SpannerBackups + import/exportNo PITR, but versioned retention
FirestoreScheduled backups + exportPITR (last 7 days)
BigtableTable backupsNo PITR
BigQueryAutomatic (time travel)Time travel (7 days default)
  • Cloud SQL PITR requires automated backups AND binary logging enabled - restoring to a specific timestamp replays logs on top of the last backup, into a NEW instance.
  • BigQuery time travel lets you query or restore a table as it was up to 7 days ago; no separate backup job needed.
GotchaRestore creates a new instance

A Cloud SQL restore (especially PITR) restores into a new instance, not over the running one. Plan to repoint your app. Deleting the instance also deletes its automated backups unless you exported them.

Redundancy: regional vs multi-region

  • Zonal - one zone. A zone outage takes it down. (e.g. a single Compute Engine disk.)
  • Regional - replicated across zones IN one region. Survives a zone failure. Cloud SQL HA and most databases default here.
  • Multi-region - replicated across regions. Survives a whole-region failure. Higher cost/latency. Spanner multi-region, Firestore, and multi-region Cloud Storage buckets.

Cloud Storage location types

DECISIONWhich bucket location?
Low latency near compute, single-region appsRegion (e.g. us-central1)Multi-zone in one region
Defined geo-redundancy + low latencyDual-region (e.g. nam4)Two specific regions
Highest availability, content served broadlyMulti-region (e.g. US, EU)Across a large geography
Pick this when: wider = more resilient + higher cost/latency
GotchaLocation is permanent

A bucket's location is set at creation and can NEVER be changed. To "move" a bucket you create a new one in the target location and copy the objects over. Co-locate buckets with the compute that reads them to avoid egress costs and latency.