Bird
Raised Fist0
GCPcloud~20 mins

Disaster recovery strategies in GCP - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Disaster Recovery Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Understanding RTO and RPO in Disaster Recovery

Which statement correctly describes the difference between Recovery Time Objective (RTO) and Recovery Point Objective (RPO) in disaster recovery?

ARTO is the maximum acceptable time to restore services after a disaster; RPO is the maximum acceptable data loss measured in time.
BRTO is the maximum data loss allowed; RPO is the time it takes to restore services after a disaster.
CRTO and RPO both measure the time to restore services but in different units.
DRTO measures data loss in bytes; RPO measures downtime in hours.
Attempts:
2 left
💡 Hint

Think about what each objective aims to limit: downtime or data loss.

❓ Architecture
intermediate
2:00remaining
Choosing a Disaster Recovery Architecture in GCP

You want to design a disaster recovery solution for a critical application on Google Cloud Platform. The application requires minimal downtime and data loss. Which architecture best fits this need?

ABackup and restore: Periodic backups stored in Cloud Storage, restore when needed.
BPilot light: Minimal critical components running in a secondary region, scaled up on disaster.
CWarm standby: A scaled-down version of the full environment running in a secondary region, ready to scale up.
DCold standby: No resources running in the secondary region until disaster occurs.
Attempts:
2 left
💡 Hint

Consider which option balances readiness and cost for minimal downtime.

❓ Configuration
advanced
2:30remaining
Configuring Cross-Region Replication for Cloud Storage

Which configuration snippet correctly enables cross-region replication for a Google Cloud Storage bucket named 'source-bucket' to replicate objects to 'destination-bucket' in another region?

GCP
gsutil versioning set on gs://source-bucket

# Replication configuration below
Agsutil bucket replication set --source=source-bucket --destination=destination-bucket --location=us-east1
Bgsutil replication create gs://source-bucket gs://destination-bucket
Cgsutil replication create --source=source-bucket --destination=destination-bucket --location=us-central1
Dgsutil replication set --source=source-bucket --destination=destination-bucket --location=us-east1
Attempts:
2 left
💡 Hint

Check the correct gsutil command syntax for bucket replication creation.

❓ security
advanced
1:30remaining
Securing Disaster Recovery Access in GCP

To ensure secure access to disaster recovery resources in a secondary region, which IAM policy practice is best?

AGrant all users the Editor role on the recovery project for quick access.
BDisable IAM policies on the recovery project to prevent accidental lockout.
CAssign Owner role to all team members on the recovery project to avoid delays.
DUse least privilege principle by granting only necessary roles to specific users or groups.
Attempts:
2 left
💡 Hint

Think about minimizing risk while allowing access.

❓ service_behavior
expert
2:00remaining
Behavior of Multi-Region Failover with Cloud SQL

In a Cloud SQL instance configured with high availability across multiple regions, what happens automatically when the primary region becomes unavailable?

ACloud SQL automatically fails over to the standby instance in the secondary region with minimal downtime.
BCloud SQL requires manual intervention to switch to the standby instance in the secondary region.
CCloud SQL stops serving traffic until the primary region is restored.
DCloud SQL creates a new instance in a different region and migrates data automatically.
Attempts:
2 left
💡 Hint

Consider how managed services handle failover for high availability.

Practice

(1/5)
1. What is the main goal of a disaster recovery strategy in cloud infrastructure?
easy
A. To improve user interface design
B. To keep services running during unexpected problems
C. To increase the speed of data processing
D. To reduce the cost of cloud services

Solution

  1. Step 1: Understand disaster recovery purpose

    Disaster recovery aims to keep systems available and data safe during failures or disasters.
  2. Step 2: Identify the main goal

    The main goal is to maintain service uptime and data integrity despite problems.
  3. Final Answer:

    To keep services running during unexpected problems -> Option B
  4. Quick Check:

    Disaster recovery = keep services safe [OK]
Hint: Disaster recovery means service stays up during trouble [OK]
Common Mistakes:
  • Confusing disaster recovery with cost saving
  • Thinking it improves speed or UI
  • Ignoring service availability
2. Which GCP service is commonly used to store backups for disaster recovery?
easy
A. Cloud Pub/Sub
B. Google Compute Engine
C. Google Kubernetes Engine
D. Google Cloud Storage

Solution

  1. Step 1: Identify backup storage service

    Backups need durable, scalable storage. Google Cloud Storage is designed for this.
  2. Step 2: Exclude compute and messaging services

    Compute Engine and Kubernetes Engine run workloads, Pub/Sub handles messaging, not backups.
  3. Final Answer:

    Google Cloud Storage -> Option D
  4. Quick Check:

    Backup storage = Cloud Storage [OK]
Hint: Backups go to Cloud Storage, not compute or messaging [OK]
Common Mistakes:
  • Choosing compute services for backup storage
  • Confusing messaging service with storage
  • Not knowing Cloud Storage purpose
3. Consider this GCP setup code snippet for disaster recovery:
resource "google_compute_instance" "primary" {
  name         = "primary-instance"
  zone         = "us-central1-a"
  machine_type = "e2-medium"
  boot_disk {
    initialize_params {
      image = "debian-cloud/debian-11"
    }
  }
}

resource "google_compute_instance" "backup" {
  name         = "backup-instance"
  zone         = "us-central1-b"
  machine_type = "e2-medium"
  boot_disk {
    initialize_params {
      image = "debian-cloud/debian-11"
    }
  }
}
What is the main benefit of this configuration for disaster recovery?
medium
A. It creates two instances in different zones to improve availability
B. It reduces the cost by using smaller machines
C. It backs up data automatically to Cloud Storage
D. It enables faster network speed between instances

Solution

  1. Step 1: Analyze instance zones

    The two instances are in different zones (us-central1-a and us-central1-b), which protects against zone failure.
  2. Step 2: Identify disaster recovery benefit

    Having instances in separate zones improves availability and fault tolerance during disasters.
  3. Final Answer:

    It creates two instances in different zones to improve availability -> Option A
  4. Quick Check:

    Multi-zone instances = better availability [OK]
Hint: Different zones mean better uptime during failures [OK]
Common Mistakes:
  • Assuming cost reduction is main goal
  • Thinking data backup happens automatically
  • Confusing network speed with disaster recovery
4. You have a disaster recovery plan that uses snapshots for backups. After a disaster, the recovery fails because snapshots are missing. What is the most likely error?
medium
A. Snapshots were stored in the same zone as the primary data
B. Snapshots were not scheduled regularly
C. Snapshots were encrypted with the wrong key
D. Snapshots were created from the wrong disk

Solution

  1. Step 1: Understand snapshot storage risk

    If snapshots are stored only in the same zone, a zone failure can destroy both primary data and backups.
  2. Step 2: Identify cause of missing snapshots

    Storing snapshots in the same zone risks losing them during a disaster affecting that zone.
  3. Final Answer:

    Snapshots were stored in the same zone as the primary data -> Option A
  4. Quick Check:

    Backups must be in different zones [OK]
Hint: Backups in same zone vanish with disaster [OK]
Common Mistakes:
  • Ignoring backup location importance
  • Assuming encryption or disk choice caused failure
  • Not scheduling snapshots regularly
5. You want to design a disaster recovery plan for a critical GCP application that must recover within minutes after a regional outage. Which combination of strategies is best?
hard
A. Use multi-zone deployment with weekly snapshots and manual recovery
B. Use single-zone deployment with daily manual backups to Cloud Storage
C. Use multi-region deployment with automated failover and continuous data replication
D. Use single-region deployment with monthly backups and no failover

Solution

  1. Step 1: Identify recovery time objective (RTO)

    Recovery within minutes requires fast failover and minimal data loss.
  2. Step 2: Evaluate strategies for fast recovery

    Multi-region deployment with automated failover and continuous replication ensures quick switch and up-to-date data.
  3. Step 3: Compare with other options

    Single-zone or single-region with manual backups are slower and risk data loss; weekly or monthly backups are too infrequent.
  4. Final Answer:

    Use multi-region deployment with automated failover and continuous data replication -> Option C
  5. Quick Check:

    Fast recovery needs multi-region + automation [OK]
Hint: Fast recovery needs multi-region and automation [OK]
Common Mistakes:
  • Choosing single-zone or single-region for critical apps
  • Relying on manual backups for quick recovery
  • Ignoring continuous data replication
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard