0
0
GCPcloud~30 mins

Backup and restore in GCP - Mini Project: Build & Apply

Choose your learning style9 modes available
Backup and restore
📖 Scenario: You work as a cloud engineer for a small company. They want to protect their important data stored in Google Cloud Storage by creating backups. You will create a simple backup and restore setup using Google Cloud Storage buckets.
🎯 Goal: Create a Google Cloud Storage bucket named primary-bucket to hold original files. Then create a backup-bucket to store backups. Finally, write a configuration to copy files from primary-bucket to backup-bucket to simulate backup, and a command to restore files back from backup-bucket to primary-bucket.
📋 What You'll Learn
Create a Google Cloud Storage bucket named primary-bucket
Create a Google Cloud Storage bucket named backup-bucket
Write a gsutil command to copy all files from primary-bucket to backup-bucket for backup
Write a gsutil command to copy all files from backup-bucket back to primary-bucket for restore
💡 Why This Matters
🌍 Real World
Backing up important data in cloud storage protects against accidental deletion or corruption.
💼 Career
Cloud engineers often set up backup and restore processes to ensure data durability and availability.
Progress0 / 4 steps
1
Create the primary storage bucket
Create a Google Cloud Storage bucket named primary-bucket using the gsutil mb command.
GCP
Need a hint?

Use gsutil mb followed by the bucket URL gs://primary-bucket/ to create the bucket.

2
Create the backup storage bucket
Create a Google Cloud Storage bucket named backup-bucket using the gsutil mb command.
GCP
Need a hint?

Use gsutil mb followed by the bucket URL gs://backup-bucket/ to create the backup bucket.

3
Backup files from primary to backup bucket
Write a gsutil cp command to copy all files from primary-bucket to backup-bucket recursively for backup.
GCP
Need a hint?

Use gsutil -m cp -r to copy recursively and in parallel all files from gs://primary-bucket/ to gs://backup-bucket/.

4
Restore files from backup to primary bucket
Write a gsutil cp command to copy all files from backup-bucket back to primary-bucket recursively for restore.
GCP
Need a hint?

Use gsutil -m cp -r to copy recursively and in parallel all files from gs://backup-bucket/ back to gs://primary-bucket/.