它是现有对象的计费操作更改存储 Class 吗?

Is it a Billable Op Changing Storage Class of Existing Objects?

我正在尝试更改一组现有对象(超过 300 GB)的存储 class

我先在一个文件上试了一下:

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 个,然后在子目录中的其余对象上进行了尝试...效果很好☺,尽管 操作会覆盖创建和更新时间!

虽然我有两个后续查询:

  1. gsutil rewrite 操作是否收费?
  2. 创世时间能否保留?

非常感谢。

干杯!

菲纳利

Yes, it is billable as a Class A operation (it uses storage.objects.rewrite, see cloud.google.com/storage/pricing). No, there's no way to preserve the creation/update time because rewrite creates a new object generation.

–Travis Hobrla