Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to compute an object's checksum from within Google Cloud Platform?

Basically all I want to do is run sha1sum my-bucket/my-object so that I can compare the object's digest to the digest of a copy of the object stored on my local drive.

gsutil doesn't appear to be able to do this, and from reading all of Google's docs, there doesn't appear to be a simple way to do this.

Am I missing something? Would I have to run a VM in Compute Engine and access the object that way?

I'm not very familiar with Google's platform so forgive me if this is a silly question. Thanks for any help!

like image 596
John Templeton Avatar asked Jan 29 '16 21:01

John Templeton


People also ask

How does Google cloud Compute work?

Cloud computing today allows hardware and software products to co-exist remotely (in data centers) and at-scale. Together these products work to deliver specific services. Users typically can access, manage, and use the tools they require via a web-interface – and that's true for Google Cloud Platform services as well.

What are compute services in Google cloud?

Do faster math, run large in-memory databases, and build cloud‐native apps with our cost-effective, scalable virtual machines. Whether you choose predefined or custom VMs, they all run on Google infrastructure.

What is Google data compute?

Compute Engine is a computing and hosting service that lets you create and run virtual machines on Google infrastructure. Compute Engine offers scale, performance, and value that lets you easily launch large compute clusters on Google's infrastructure.


1 Answers

gsutil hash your-local-file will compute MD5 and CRC32C hashes of your local file.

You can then compare those with the hash(es) of your cloud object, which you can view by running gsutil stat gs://your-bucket/your-object.

Google Cloud Storage doesn't store SHA hashes of object data, but all GCS objects have a CRC32C checksum available in their metadata and many objects also have an MD5 hash - see Hashes and ETags for more information.

like image 106
Travis Hobrla Avatar answered Sep 28 '22 03:09

Travis Hobrla