0
0
GCPcloud~20 mins

Object versioning in GCP - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Object Versioning Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
How does enabling object versioning affect storage costs?

When you enable object versioning on a Google Cloud Storage bucket, what happens to your storage costs?

ACosts remain the same because only the latest version is billed.
BCosts increase because all versions of objects are stored and billed separately.
CCosts decrease because older versions are automatically deleted to save space.
DCosts increase only if you manually enable billing for versions.
Attempts:
2 left
💡 Hint

Think about how storing multiple copies affects space.

service_behavior
intermediate
2:00remaining
What happens when you delete an object in a versioned bucket?

In a Google Cloud Storage bucket with object versioning enabled, what happens when you delete an object without specifying a version?

AA delete marker is added, hiding the current version but older versions remain accessible.
BAll versions of the object are permanently deleted immediately.
CThe latest version is permanently deleted and older versions are also deleted automatically.
DThe object is moved to a trash folder for 30 days before permanent deletion.
Attempts:
2 left
💡 Hint

Consider how versioning preserves data after deletion.

Configuration
advanced
2:00remaining
Identify the correct gsutil command to enable versioning

Which gsutil command correctly enables object versioning on a bucket named my-bucket?

Agsutil set versioning enabled gs://my-bucket
Bgsutil enable versioning gs://my-bucket
Cgsutil versioning set on gs://my-bucket
Dgsutil bucket versioning enable gs://my-bucket
Attempts:
2 left
💡 Hint

Check the gsutil syntax for versioning commands.

security
advanced
2:00remaining
How does object versioning impact data recovery after accidental overwrite?

With object versioning enabled, what is the best way to recover data after an accidental overwrite of an object?

AOverwrite the object again with a backup copy stored outside the bucket.
BUse the trash folder to restore the deleted object within 7 days.
CContact Google support to retrieve overwritten data.
DRestore the previous version by specifying its generation number to download or copy it.
Attempts:
2 left
💡 Hint

Think about how versioning stores multiple copies.

Architecture
expert
3:00remaining
Designing lifecycle rules with versioning to minimize costs

You have a bucket with object versioning enabled. You want to keep the latest version indefinitely but automatically delete noncurrent versions older than 30 days to reduce costs. Which lifecycle rule configuration achieves this?

A{"rule": [{"action": {"type": "Delete"}, "condition": {"daysSinceNoncurrentTime": 30}}]}
B{"rule": [{"action": {"type": "Delete"}, "condition": {"age": 30, "isLive": true}}]}
C{"rule": [{"action": {"type": "Delete"}, "condition": {"age": 30}}]}
D{"rule": [{"action": {"type": "Delete"}, "condition": {"numNewerVersions": 1}}]}
Attempts:
2 left
💡 Hint

Focus on conditions that target only noncurrent versions.