Prepare and test your skills
Prepare and test your skills
Data Protection and Restoration Procedures are the workflows that keep data durable and recoverable when a zone or region fails or when data is deleted or corrupted. In Google Cloud, the workflows combine Cloud Storage (opens in a new tab) placement and replication for object data with scheduled backups, exports, clones, and point-in-time recovery for managed databases such as Firestore (opens in a new tab). Together these controls decide where copies live, how far back recovery can go, and how quickly work can resume.
Multi-regional storage is a placement strategy that stores copies in at least two geographically separate areas so one large disruption does not remove all copies. In Cloud Storage, objects in dual-regions and multi-regions are stored in at least two separate areas regardless of storage class. A dual-region uses a pair of regions that you choose, while a multi-region uses any combination of data centers in that multi-region, which can include data centers that are not listed as standalone regions.
Replication behavior controls how much object data could be lost. Turbo replication replicates data to both regions of a dual-region with a recovery point objective (RPO) of 15 minutes, which is the maximum acceptable data loss. Cross-bucket replication asynchronously replicates data from a source bucket to a destination bucket in a different location. When stronger proof of a second copy is needed, a common pattern is to use two single-region buckets and either dual-write the object to both buckets or write to one bucket and copy the object to the second bucket with a rewrite operation.
Firestore in both Native mode and Datastore mode handles infrastructure replication automatically with no extra provisioning. A regional Firestore database synchronously replicates data across at least three zones and provides 99.99% availability, so traffic survives a zonal loss. A multi-region Firestore database synchronously replicates data across five zones in three regions, with two serving regions and one witness region, and provides 99.999% availability, so traffic can survive loss of an entire region.
Scheduled backups are full-database copies kept for longer-term rebuilds of Firestore databases. A scheduled backup can run daily or weekly with a maximum retention of 14 weeks. A backup restores to a new Firestore database in the same project, which means the workflow depends on the backup copy and the destination project remaining available. Backups provide longer retention than point-in-time recovery (PITR) and cost less to restore from than PITR data.
For retention beyond backups and for testing recovery, Firestore supports PITR-based exports and database clones. A PITR data export captures the entire database from a timestamp up to seven days in the past and saves that data in Cloud Storage indefinitely for archiving. A database clone recovers data by creating a copy from a past point in time: up to seven days in the past when PITR is enabled, and up to one hour in the past when PITR is not enabled. Recovering from a PITR export is generally more expensive than recovering the same data from a backup.
The three database recovery paths differ by retention, scope, and cost:
| Option | Retention window | Restore behavior |
|---|---|---|
| Scheduled backups | Up to 14 weeks, daily or weekly | Restore full database to a new database in the same project; lowest restore cost |
| PITR reads and writes | Up to 7 days, 1-minute granularity | Surgically read and write back only the documents needed; lowest RTO and RPO |
| PITR exports | Export from last 7 days, then stored indefinitely in Cloud Storage | Archive full database for long retention; highest recovery cost of the three |
Exam tip: Scheduled backups retain for 14 weeks and cost less for full restores, while PITR covers only 7 days at 1-minute granularity but gives lower recovery time and less data loss for surgical fixes.
Point-in-time recovery (PITR) is a managed database feature that lets an application read documents as they existed at a specific minute in the past and write only the needed data back. In Firestore, enabling PITR allows reads from any point up to seven days in the past at 1-minute granularity. The recovery time objective (RTO), or maximum time for recovery, is 0 for the read path, and the recovery point objective (RPO), or maximum data loss, is 1 minute.
PITR is chosen when the disaster is data-level rather than infrastructure-level, such as accidental deletion or modification. Because PITR reads can recover only the required documents, the workflow flows from the live database to a past timestamp and then back to the live database without restoring the entire database. This gives lower RTO and lower RPO than restoring a full backup, so use PITR for targeted correction and use scheduled backups when the whole database must be rebuilt.
Protection controls in Cloud Storage prevent or delay permanent loss before replication and backups matter. These controls apply to buckets and objects and enforce retention even if a delete or overwrite is requested:
Centralized backup services extend the same idea to virtual machines and disks. Backup and DR Service is a managed backup and disaster recovery service that stores Compute Engine Persistent Disk snapshots in Cloud Storage buckets, with centralized monitoring, auditing, and reporting for compliance and insights that help defend against ransomware. Storage Transfer Service and Transfer Appliance move or replicate data to, from, or between object and file systems, including Cloud Storage, Amazon S3, and on-premises storage, for backup and migration when a second location outside Google Cloud is required.
Establishment of recovery objectives and architectural alignment is the practice of translating business continuity mandates into measurable targets and then choosing Google Cloud patterns that can meet those targets. The two core targets are the Recovery Time Objective (RTO) (opens in a new tab), how long data or service can stay unavailable after an incident, and the Recovery Point Objective (RPO), how much data collected before the incident can acceptably be lost. Architecture aligns with these mandates when replication, backup, location controls, and key management are selected to satisfy the required RTO and RPO within cost and compliance limits.
Recovery objectives define what recovery must achieve for each application and dataset. The Recovery Time Objective (RTO) measures acceptable downtime, from instance restart time to days or weeks to rebuild a region extension, while the Recovery Point Objective (RPO) measures acceptable data loss, from zero loss to the last archivelog, backup, or replicated write. Cost and complexity increase as either value decreases, because tighter objectives require more redundancy, faster restore paths, and more frequent synchronization. Architectures labeled RPO = 0 or zero data loss require data to be written in multiple locations before it is considered committed, which makes latency a central tradeoff as RPO moves closer to zero.
In Oracle and key-dependent designs, the distinction between RTO and RPO drives different protections. Without encryption keys, data cannot be decrypted or safely written, so no new data can be safely committed and RPO is not the critical concern. The real concern becomes RTO, because recovery time depends on restoring access to the external key manager and then unencrypting and rewriting data. This is why externally managed keys require highly available key managers with their own recovery processes, plus explicit attention to latency between the workload and the key system.
Google Cloud replication architecture determines the baseline availability and geographic resilience that RTO and RPO build upon. Firestore in Datastore mode (opens in a new tab) automatically replicates without extra configuration, but the pattern depends on location: regional databases synchronously replicate across at least three zones for 99.99% availability, while multi-region databases synchronously replicate across five zones in three regions with two serving regions and one witness region for 99.999% availability. Cloud Bigtable production instances require a minimum of two clusters in unique zones in a region, and Google automatically manages replication that creates an independent copy in each zone and allows traffic to fail over to another cluster in the same instance.
BigQuery (opens in a new tab) provides a 99.99% service-level agreement (SLA) built on the BigQuery service plus available compute slots, with datasets stored as regional in one specific place such as us-central1 or multi-region in a large area such as US or EU. Cloud Storage aligns storage redundancy with RTO and RPO through bucket location choices. Objects in multi-regions and dual-regions are stored in at least two geographically separate areas regardless of storage class, which protects availability during large-scale disruptions such as natural disasters. Synchronization between regions occurs asynchronously, so if high confidence is needed that data has reached the alternative region, use two single-region buckets and either dual-write the object or write to one bucket and copy it to the second bucket.
Exam tip: In BigQuery, a multi-region location does not provide cross-region replication or regional redundancy — data is stored in a single region within that geographic location.
Locality-restricted workloads must meet RTO and RPO while keeping applications and data at rest in required places. Regional planning starts with four related decisions:
Access location is enforced with Google Cloud Armor for IP and geo-based constraints and VPC Service Controls (opens in a new tab) for context-based perimeter security, while creation location is enforced with the Organization Policy Service across the resource hierarchy. Two constraints matter most: domain-restricted sharing, which limits which Cloud Identity or Google Workspace identities can be added to Identity and Access Management (IAM) policies, and location-restricted resources, which allow or deny multi-regions such as Asia and Europe, regions such as us-east1 or europe-west1, or zones such as europe-west1-b.
When data cannot leave one region, Google Cloud alone cannot provide geographic redundancy, so the architecture must add compensating controls. One path is a multi-cloud or hybrid strategy that keeps a second copy in the same geographic area on another cloud or on-premises, using Cloud Storage interoperability for Amazon S3, open-source object stores such as minIO and Ceph, Managed Service for Apache Airflow with the gcloud storage command, or Transfer service for on-premises data. Another path is encryption-based separation, where Cloud External Key Manager (Cloud EKM) for BigQuery and Compute Engine or customer-supplied encryption keys (CSEK) for Cloud Storage and Compute Engine keeps keys outside Google infrastructure so a multi-region layout can still meet access-based locality rules. With CSEK, Google uses your key to protect Google-generated data keys for each operation and then purges your key from its servers, which again makes external key manager availability an RTO dependency.
Backup and recovery mechanisms protect against data disasters such as accidental deletion, corruption, or modification, distinct from zone or region outages handled by replication. Firestore in Datastore mode offers two complementary tools: scheduled backups with up to 14 weeks retention on a daily or weekly schedule that restore to a new database in the same project at lower restore cost, and point-in-time recovery (PITR) that reads data up to seven days in the past at one-minute granularity with RTO of 0 and RPO of one minute for surgical write-back. PITR also supports longer retention through exports of a seven-day-old timestamp to Cloud Storage for indefinite archiving, and cloning from up to seven days in the past with PITR enabled or up to one hour without it. Choose backups when longer retention and cheaper full restore matter, and choose PITR reads when only required documents must be recovered with minimal time and loss.
Data warehouse and object recovery follows the same RTO and RPO logic at larger scale. BigQuery datasets that must stay in one region can be backed up with scheduled exports via Cloud Scheduler or Managed Airflow to Cloud Storage in formats such as Avro with SNAPPY or JSON with GZIP, while append-only and date-partitioned tables can shorten RTO by backing up and restoring only recent partitions plus the update window, such as the last seven days for returns. For cross-region needs, BigQuery Data Transfer Service copies datasets to another region, and Cloud Key Management Service (Cloud KMS) with customer-managed keys allows encryption-mitigated multi-region use. Cloud Storage adds layered protection with object holds, soft delete, object versioning, bucket lock, and object retention lock, plus dual-regions, turbo replication with 15-minute RPO, and cross-bucket replication for asynchronous redundancy.
Implementation of disaster recovery patterns is the choice of how much standby capacity runs before a disaster in order to meet recovery time objective (RTO) and recovery point objective (RPO). In Google Cloud, three patterns divide this choice by readiness and cost: cold standby (opens in a new tab) keeps only backups and templates, warm standby keeps a minimal always-on replica, and hot standby keeps a full active environment. All three patterns use cross-region replication to copy data to the recovery location and use global load balancing with automated failover to move traffic when the primary fails.
Cold standby is a disaster recovery pattern where no recovery servers run during normal operation and everything is rebuilt from backups after a disaster. The production system copies database backups and transaction logs to Cloud Storage (opens in a new tab), while machine configuration is saved in custom Compute Engine images and instance templates. Instance templates are globally replicated, so the same configuration can recreate virtual machines (VMs) in any Google Cloud region. Because nothing runs in advance, cold standby has the lowest cost but the largest RTO and RPO.
A typical cold failover to Google Cloud moves data and traffic from backups to new servers in order:
Warm standby is a disaster recovery pattern where a minimal recovery environment runs at all times so RTO and RPO stay small without paying for full duplication. The recovery suite typically includes an operational database server on Compute Engine that continuously receives replicated transactions from the primary through asynchronous or semi-synchronous replication. To control cost, the standby database runs on the smallest machine type that can run the service and is resized larger only during failover. Web and application tiers are not kept running; their updated binaries and pages are captured in Compute Engine snapshots and custom images that can launch quickly.
Traffic flows from users to the primary during normal operation, and connectivity flows from the on-premises network to the Google Cloud virtual private cloud (VPC) network over Cloud Interconnect with a virtual private network (VPN). When the primary fails, the standby database is promoted to primary, application servers are launched from images and snapshots, and Cloud DNS moves traffic from the failed site to the recovery site. Because replication is usually asynchronous, warm standby offers lower latency than synchronous replication but risks losing recent writes if the outage occurs before replication completes.
Hot standby is a disaster recovery pattern where two full environments run at the same time and both can serve production traffic. In Google Cloud this is often built as an active-active topology across two or more regions, where user traffic flows from clients to a global load balancer and then to healthy backends in either region. If one region fails, health checks detect unhealthy backends and the load balancer automatically stops sending traffic to the failed region without manual DNS changes. Because both sides already run at scale, hot standby provides near-zero RTO and RPO but has the highest cost and operational complexity.
Hot standby depends on continuous data synchronization and automated healing. Cloud Spanner and Cloud Storage as multi-regional services provide built-in redundancy and synchronization across regions, while Cloud SQL high availability (HA) provides near active-active topology with cross-zone read replicas and near-zero RPO. Managed instance groups (MIGs) automatically delete and recreate failed VMs, and regional MIGs and regional Google Kubernetes Engine (GKE) clusters distribute identical instances across zones to survive a zonal outage. Regional persistent disks synchronously replicate writes across two zones in a region, so a backup VM can force-attach the disk in the secondary zone after a zonal failure.
Cross-region replication is the process that copies data from the primary region to a secondary region, multi-regional storage, or hybrid destination so recovery can meet its RPO. Zonal, regional, and multi-regional resources (opens in a new tab) differ in scope: zonal resources such as Compute Engine VMs and standard persistent disks live in one zone, regional resources are redundantly deployed across multiple zones in a region, and multi-regional resources are distributed within and across regions for the highest resilience. To survive a regional outage, regional resources must replicate data to a secondary region, to multi-regional Cloud Storage, or to another platform such as GKE. Snapshots of persistent disks can be stored in multi-region locations and restored to create disks in a different region.
The replication choice trades consistency and latency against cost and data loss. Synchronous replication writes data in multiple locations before the write is committed, which supports RPO zero but adds latency and can hurt application performance. Asynchronous replication offers lower latency at lower cost but risks losing writes made after the last transfer, so transfer frequency must be shorter than the RPO target. Persistent Disk Asynchronous Replication provides low-RPO, low-RTO block replication for Compute Engine workloads at the infrastructure level for cross-region active-passive recovery.
Global load balancing and automated failover are the mechanisms that detect failure and move traffic from the failed environment to the healthy environment. An external Application Load Balancer presents a single IP address in front of application servers, so traffic flows from clients to the load balancer and then to healthy MIG backends even when individual VMs are replaced. Cloud DNS distributes user traffic across regions, often with a regional load balancer deployed in each region or with one global load balancer spanning regions. Health checks and Cloud Monitoring alerts detect when a zone, region, or service fails and trigger recreation or rerouting.
Automation reduces manual steps that would increase RTO. MIGs provide autohealing and autoscaling, internal load balancing preserves the same database IP address when a replacement instance launches from an instance template and custom image, and startup scripts automatically build disks from the latest snapshot and mount them. Compute Engine reservations hold VM capacity in the recovery zone so on-demand capacity is available when failover starts. Business-critical operations subject to RTO and RPO must depend only on data plane components that continuously process operations, not on management plane operations such as the VM-creation API or an identity and access management (IAM) permission update.
Exam tip: High availability (HA) typically means synchronous replication between zones in one region with zero or near-zero RTO and RPO, while disaster recovery (DR) typically means asynchronous replication across two or more regions with manual or semi-automated failover.
The three standby patterns split by how much runs before failure and how fast recovery must be:
Three parallel columns compare cold, warm, and hot standby on standby resources, recovery speed and cost, and when to choose each pattern.
| Pattern | Standby resources | Choose when |
|---|---|---|
| Cold standby | Backups in Cloud Storage, snapshots, images, and templates; no running servers | Cost matters most and RTO of hours and some data loss are acceptable |
| Warm standby | Minimal always-on database replica with async replication plus snapshots for app tiers | A balance of budget and availability is needed with RTO near one hour |
| Hot standby | Full active-active environments with sync or continuous replication and load balancing | Downtime and data loss must be near zero for customer-facing or payment systems |
Smaller RTO and RPO values increase cost and complexity because more capacity, replication, and automation must run continuously. Test the chosen failover regularly, overprovision about one-third extra capacity across three zones per region to absorb shifted traffic, and prefer wider-scope resources — regional over zonal, and multi-regional or global over regional — to avoid restoring from backups.
Firestore scheduled backups run daily or weekly with up to 14 weeks retention and restore the full database to a new database in the same project at the lowest restore cost, while Firestore point-in-time recovery (PITR) covers up to 7 days at 1-minute granularity for surgically reading and writing back only the needed documents with the lowest Recovery Time Objective (RTO) and Recovery Point Objective (RPO). Use scheduled backups when the whole database must be rebuilt and use point-in-time recovery (PITR) for targeted correction of data-level issues such as accidental deletion or modification.
Cold standby keeps only backups in Cloud Storage, snapshots, images, and templates with no running servers at the lowest cost but the largest Recovery Time Objective (RTO) and Recovery Point Objective (RPO), warm standby keeps a minimal always-on database replica with asynchronous replication plus snapshots for app tiers, and hot standby runs full active-active environments with continuous replication and load balancing at the highest cost. Choose cold standby when cost matters most and hours of Recovery Time Objective (RTO) and some data loss are acceptable, warm standby when a balance of budget and availability is needed with Recovery Time Objective (RTO) near one hour, and hot standby when downtime and data loss must be near zero for customer-facing or payment systems.
High availability (HA) typically uses synchronous replication between zones in one region with zero or near-zero Recovery Time Objective (RTO) and Recovery Point Objective (RPO), while disaster recovery (DR) typically uses asynchronous replication across two or more regions with manual or semi-automated failover.
An enterprise financial application hosted on Google Cloud requires strict business continuity targets. Stakeholders have established the following requirements:
Which database and compute architecture on Google Cloud best aligns with these defined recovery objectives?
Last updated