我试图更改一组现有对象(超过300 GB)的存储类as advised in this post:
我首先在一个文件上尝试了它:
fyn@pod-arch:~$ gsutil ls -L gs://some-bucket/sub-dir/audioArch.mp3
gs://some-bucket/sub-dir/audioArch.mp3:
Creation time: Fri, 29 Jul 2016 00:52:51 GMT
Update time: Fri, 05 Aug 2016 15:40:51 GMT
Storage class: DURABLE_REDUCED_AVAILABILITY
Content-Language: en
Content-Length: 43033404
Content-Type: audio/mpeg
... ...
fyn@pod-arch:~$ gsutil -m rewrite -s coldline gs://some-bucket/sub-dir/audioArch.mp3
- [1/1 files][ 41.0 MiB/ 41.0 MiB] 100% Done
Operation completed over 1 objects/41.0 MiB.
fyn@pod-arch:~$ gsutil ls -L gs://some-bucket/sub-dir/audioArch.mp3
gs://some-bucket/sub-dir/audioArch.mp3:
Creation time: Sun, 30 Oct 2016 23:49:34 GMT
Update time: Sun, 30 Oct 2016 23:49:34 GMT
Storage class: COLDLINE
Content-Language: en
Content-Length: 43033404
Content-Type: audio/mpeg
... ...
然后我尝试了15个以上,然后在子目录中的其余对象上... 像魅力一样工作☺,尽管操作会覆盖Creation&更新时间!
我有两个后续查询:
gsutil rewrite
操作是否可以投放?非常感谢。
干杯!
fynali
答案 0 :(得分:2)
是的,它可以作为A类操作(它使用 storage.objects.rewrite,见cloud.google.com/storage/pricing)。没有, 由于重写,无法保留创建/更新时间 创建一个新的对象生成。
-Travis Hobrla in comment here