new gsutil version supporting Object Versioning and Durable Reduced Availability Storage

96 views
Skip to first unread message

Mike Schwartz (Google Storage Team)

unread,
Nov 27, 2012, 11:03:59 AM11/27/12
to gs-dis...@googlegroups.com, gsutil-...@googlegroups.com
Hi,

You may have seen our blog posting yesterday, announcing a number of new features, including Object Versioning and Durable Reduced Availability Storage. The latest version (3.19) of gsutil supports these two features. You can get this version of gsutil by running the command:

gsutil update

As a quick start example, you can enable versioning on a bucket and work with versions as follows: 

gsutil setversioning on gs://my_bucket
gsutil cp file1 gs://my_bucket/obj
gsutil cp file2 gs://my_bucket/obj
gsutil ls -l -a gs://my_bucket/obj
      5924  2012-11-27T04:08:16  gs://my_bucket/obj#1353989296246000.1
       192  2012-11-27T04:08:28  gs://my_bucket/obj#1353989308897000.1
TOTAL: 2 objects, 6116 bytes (5.97 KB)

gsutil cp -v gs://mfsbucket/obj#1353989296246000.1 old_obj

The gsutil ls "-a" option allows you to see all of the versions of a particular object.
The gsutil cp "-v" option allows you to copy a particular version.
 
You can use Durable Reduced Availability storage (once you are signed up for the Limited Preview) as follows:

gsutil mb -c DRA gs://my_dra_bucket

At this point you can upload objects to your bucket and read them as usual (e.g, using the gsutil cp command). You can see the bucket's storage class as follows:

gsutil ls -L -b gs://my_dra_bucket
gs://my_dra_bucket/ :
0 objects, 0.0 B
StorageClass: DURABLE_REDUCED_AVAILABILITY
LocationConstraint: US
...
 
Thanks,
Mike Schwartz and the Google Cloud Storage Team
Reply all
Reply to author
Forward
0 new messages