Managing Cloud Storage
In Chapter 11, you saw how to use lifecycle management policies to automatically change a bucket’s storage class. For example, you could create a policy to change a regional storage class bucket to a nearline bucket after 90 days. There may be times, however, when you would like to manually change a bucket’s storage class. In those cases, you can use the gsutil rewrite command and specify the -s flag. Here’s an example:
gsutil rewrite -s [STORAGE_CLASS] gs://[PATH_TO_OBJECT]
Here, [STORAGE_CLASS] is the new storage class. It can be multi_regional, regional, nearline, or coldline.
Another common task with Cloud Storage is moving objects between buckets. You can do this using the gsutil mv command. The form of the command is as follows:
gsutil mv gs://[SOURCE_BUCKET_NAME]/[SOURCE_OBJECT_NAME] \ gs://[DESTINATION_BUCKET_NAME]/[DESTINATION_OBJECT_NAME]
Here...





















































