Bitzu

Associate Cloud Engineer ยท Operating databases and data jobs

How do Cloud SQL backups and point-in-time recovery work?

Cloud SQL automated and on-demand backups and PITR, Firestore export/import and PITR, Spanner/AlloyDB/Bigtable backups, restoring to a new instance.

Key points

  • Automated backups follow a retention you configure (1 to 365).
  • On-demand backups can be taken any time and standard ones stay until deleted.
  • Point-in-time recovery never overwrites the source: gcloud sql instances clone SOURCE TARGET --point-in-time TIMESTAMP creates a new instance as of a UTC moment.

Source: https://docs.cloud.google.com/sql/docs/postgres/backup-recovery/pitr

Practice questions

Single choice

What does a Cloud SQL point-in-time recovery produce?

  1. A new instance cloned as of the chosen time
  2. The source instance rewound in place
  3. A BigQuery snapshot table
  4. A read replica of the source
Show answer

Answer: A. A new instance cloned as of the chosen time

A PITR always creates a separate clone instance. It never overwrites the source or an existing instance.

Select all that apply

Which statements about Cloud SQL backups are correct?

  1. On-demand backups can be created even if automated backups are off
  2. Standard on-demand backups stay until you delete them
  3. Automated backup retention can be set between 1 and 365
  4. PITR rewinds the existing instance in place
  5. On-demand backups expire automatically after seven days
Show answer

Answer: A. On-demand backups can be created even if automated backups are off, B. Standard on-demand backups stay until you delete them, C. Automated backup retention can be set between 1 and 365

On-demand backups work with or without automated ones, standard on-demand backups persist until you delete them, and automated retention is configurable from 1 to 365. A PITR does not restore in place and on-demand backups do not expire after a week.

True or false

A Cloud SQL point-in-time recovery overwrites the source instance with its earlier state.

Show answer

Answer: False

False. PITR produces a separate clone; restores never overwrite an existing instance.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More Associate Cloud Engineer topics in this module