Google Certified Associate Cloud Engineer 2020

Sign Up Free or Log In to participate!

Cloud Storage

After I enable versioning on cloud storage, I tried to delete the object and it is gone mean I cannot view it on the console anymore yet I can view it using gsutil by specifying -a. So Are there any ways that we can recovered the object back?

1 Answers

Yes.  You need to do:

gsutil ls -a gs://

look at the entire file name – including version number

then do a gsutil cp gs:///<fullfilename#version> gs:///new file

Example:

gsutil cp gs://sandbox9999/gsutil-lab-commands.txt#1631820504908769 gs://sandbox9999/gsutil_restore.txt

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?