我试图更改一组现有对象的存储类别(超过 300 GB)正如这篇文章中所建议的 https://stackoverflow.com/questions/40277021/change-storage-class-of-existing-objects-in-google-cloud-storage:
我首先在一个文件上尝试过:
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 个对象进行了尝试,然后对子目录中的其余对象进行了尝试......奇迹般有效☺,虽然该操作会覆盖创建和更新时间!
不过,我有两个后续查询:
- Is
gsutil rewrite
运营可计费吗?
- 创建时间可以保留吗?
非常感谢。
Cheers!
fynali
Yes, 按 A 类运营计费(它用
storage.objects.rewrite,参见cloud.google.com/storage/pricing https://cloud.google.com/storage/pricing)。不,
有无法保留创建/更新时间因为重写
创建新的对象生成。
——特拉维斯·霍布拉在这里评论 https://stackoverflow.com/questions/40277021/change-storage-class-of-existing-objects-in-google-cloud-storage
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)