Prepare and test your skills
Prepare and test your skills
Free sample question, answered and explained below. The Professional Cloud Architect practice bank has 2,335 more like it. Try 10 free: instant score, no account.
A DevOps engineer is optimizing an automated migration pipeline that uses the gsutil CLI to synchronize a large on-premises directory structure (/data/reports) containing hundreds of thousands of files to a destination bucket named gs://company-reports-archive.
The synchronization routine must satisfy the following technical requirements:
Which command should the engineer execute?
This command attempts to use the gsutil cp (copy) command with flags that are specific to the rsync synchronization tool.
cp: The gsutil cp command does not accept the -d (delete destination objects) or -c (checksum-based change detection) flags. Those flags are exclusive to the rsync subcommand.gsutil cp blindly copies all specified matching files, overwriting destinations unless configured otherwise, rather than comparing source and destination trees to find deltas.cp is designed for moving and copying specified files or directory trees; rsync is designed to synchronize state between two storage targets.cp cannot inspect the target bucket to identify and prune orphaned files that no longer exist at the source./data/reports/* in shells with hundreds of thousands of files can exceed OS argument length limits.The requirement was simply to execute a recursive multi-threaded bulk upload of an entire folder without performing delta checks or destination object deletions.
This option attempts to run gsutil rsync while misplacing the multi-threading -m flag and using an invalid flag syntax for checksum comparisons.
-m placement: In gsutil, the multi-threading/multi-processing flag (-m) is a top-level global option that must be specified immediately after gsutil and before the subcommand (rsync). Placing it as a subcommand argument will cause a command parsing error.--checksum flag: The gsutil rsync command uses -c to force checksum comparison. Specifying --checksum is invalid syntax for gsutil.-m, -q, -D, and -o govern the execution environment of gsutil and cannot be passed after subcommands.gsutil strictly enforces global vs. subcommand flag boundaries.-m is omitted or misplaced, gsutil defaults to sequential processing, causing significant performance degradation.The command used proper global flag positioning (gsutil -m rsync ...) and standard short-form flags (-c).
gsutil -m rsync isThe gsutil rsync command synchronizes the contents between two directories, buckets, or a combination of local filesystems and cloud buckets. When combined with the top-level -m option, gsutil executes multi-threaded and multi-process operations concurrently across multiple worker processes, drastically decreasing overall data transfer time for directories containing high file volumes.
-m flag directly after gsutil enables parallel processing across available CPU cores and network threads.-r flag instructs gsutil rsync to recursively traverse and process all child directories within /data/reports.-d flag directs rsync to delete any objects in the destination (gs://company-reports-archive) that are not present in the local source directory.gsutil rsync compares only file sizes and modification timestamps to determine if a file has changed. The -c flag forces gsutil to calculate and compare object checksums (MD5/CRC32c), ensuring modified files with identical sizes or timestamps are accurately updated.This command correctly uses the top-level -m flag prior to the subcommand, pairs it with rsync, and specifies all required synchronization modifier flags (-r, -d, and -c), fulfilling all scenario requirements in a single operation.
This command uses gsutil rsync sequentially without enabling multi-threading or forced checksum verification, and uses the long-form flag syntax typical of gcloud storage.
-m flag, gsutil rsync processes files sequentially, leading to poor performance and prolonged execution times over large datasets.-c flag, gsutil rsync relies solely on file size and last modification time, failing to detect files whose contents changed without affecting modification timestamps or byte size.The workload was running on the newer gcloud storage CLI (where multi-threading is default) and checksum calculation was not required.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated