0
0
GCPcloud~30 mins

Disaster recovery strategies in GCP - Mini Project: Build & Apply

Choose your learning style9 modes available
Disaster Recovery Strategies with GCP
📖 Scenario: You work for a small company that wants to protect its data and applications from unexpected disasters like data center failures or accidental deletions. You will create a simple disaster recovery setup using Google Cloud Platform (GCP) to keep a backup of a storage bucket in another region.
🎯 Goal: Build a disaster recovery setup by creating a Cloud Storage bucket, configuring a backup bucket in a different region, and setting up a lifecycle rule to keep backups for 30 days.
📋 What You'll Learn
Create a Cloud Storage bucket named primary-bucket in the us-central1 region.
Create a backup Cloud Storage bucket named backup-bucket in the us-east1 region.
Configure a lifecycle rule on backup-bucket to delete objects older than 30 days.
💡 Why This Matters
🌍 Real World
Companies use disaster recovery strategies to protect data from loss due to failures or accidents by keeping backups in different locations.
💼 Career
Cloud engineers and administrators must know how to set up and manage backup storage and lifecycle policies to ensure data durability and compliance.
Progress0 / 4 steps
1
Create the primary Cloud Storage bucket
Write the gcloud command to create a Cloud Storage bucket named primary-bucket in the us-central1 region.
GCP
Need a hint?

Use gcloud storage buckets create with --location to specify the region.

2
Create the backup Cloud Storage bucket
Write the gcloud command to create a Cloud Storage bucket named backup-bucket in the us-east1 region.
GCP
Need a hint?

Use the same command as before but change the bucket name and region.

3
Configure lifecycle rule to delete old backups
Write a JSON lifecycle configuration that deletes objects older than 30 days. Save it to a file named lifecycle.json. The JSON must have a rule with action type Delete and a condition with age set to 30.
GCP
Need a hint?

The JSON must have a rule array with one object containing action and condition.

4
Apply the lifecycle rule to the backup bucket
Write the gcloud command to apply the lifecycle configuration from lifecycle.json to the backup-bucket.
GCP
Need a hint?

Use gcloud storage buckets update with --lifecycle-file to apply the rule.