Verify Uploaded Content in Cloud Storage | Minimize Cost & Effort | PCA Exam

Verify Uploaded Content

Question

Your company is planning to upload several important files to Cloud Storage.

After the upload is completed, they want to verify that the uploaded content is identical to what they have on-premises.

You want to minimize the cost and effort of performing this check.

What should you do?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

C.

The correct answer is A. Here's a detailed explanation of why:

Option A suggests the following steps:

  1. Use Linux shasum to compute a digest of files you want to upload.
  2. Use gsutil -m to upload all the files to Cloud Storage.
  3. Use gsutil cp to download the uploaded files.
  4. Use Linux shasum to compute a digest of the downloaded files.
  5. Compare the hashes.

The first step involves using the shasum utility in Linux to compute a cryptographic hash of the files that are to be uploaded. This hash is a unique fingerprint of the file that can be used to verify its integrity later.

The second step uses the gsutil tool with the -m option to upload all the files to Cloud Storage. The -m option is used to perform a parallel/multi-threaded upload of files, which can save time and reduce costs.

In the third step, gsutil cp command is used to download the uploaded files from Cloud Storage. This will ensure that the files that were uploaded to Cloud Storage are identical to the original files on-premises.

In the fourth step, shasum is used again to compute the hash of the downloaded files. This step is essential as it ensures that the files downloaded from Cloud Storage are identical to the original files on-premises.

Finally, in the fifth step, the two hashes computed in steps one and four are compared. If they are identical, it means that the files uploaded to Cloud Storage are identical to the original files on-premises.

Option B suggests using gsutil to upload the files, and then using a custom Java application to compute CRC32C hashes. The gsutil ls command is then used to collect CRC32C hashes of the uploaded files. Finally, the hashes are compared.

While this option may work, it involves developing a custom Java application, which can be time-consuming and costly. Also, CRC32C is not as secure as cryptographic hashes like SHA-256.

Option C suggests using gsutil to upload the files, downloading them using gsutil cp, and then comparing the files using the diff utility in Linux.

This option is not the best choice because it involves downloading the files, which can be time-consuming and costly. Additionally, comparing the files using diff can be error-prone if the files are large or if there are many files.

Option D suggests using gsutil to upload the files and then using the gsutil hash command to generate CRC32C hashes of all on-premises files. The gsutil ls command is then used to collect CRC32C hashes of the uploaded files, which are compared.

This option is not the best choice because, as mentioned earlier, CRC32C is not as secure as cryptographic hashes like SHA-256. Additionally, using gsutil hash to generate hashes of on-premises files can be time-consuming and may not be the best approach if there are many files.