这是否是可变更的存储类别的现有对象? [英] Is it a Billable Op Changing Storage Class of Existing Objects?

查看:161
本文介绍了这是否是可变更的存储类别的现有对象?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图更改一组现有对象的存储类(超过300 GB)在这篇文章中建议



我先在一个文件上试过它:

  fyn @ pod-arch:〜$ gsutil ls -L gs://some-bucket/sub-dir/audioArch.mp3 
gs:/ /some-bucket/sub-dir/audioArch.mp3:
创建时间:2016年7月29日星期五,00:52:51 GMT
更新时间:2016年8月5日星期五,2016年8月5日星期五15:40:51 GMT
存储类别:DURABLE_REDUCED_AVAILABILITY
内容 - 语言:en
内容长度:43033404
内容类型:audio / mpeg
... ...

fyn @ pod-arch:〜$ gsutil -m rewrite -s coldline gs://some-bucket/sub-dir/audioArch.mp3
- [1/1个文件] [41.0 MiB / 41.0 MiB] 100%完成
超过1个物体/ 41.0 MiB完成操作。

fyn @ pod-arch:〜$ gsutil ls -L gs://some-bucket/sub-dir/audioArch.mp3
gs:// some-bucket / sub-dir /audioArch.mp3:
创建时间:2016年10月30日星期日23:49:34 GMT
更新时间:2016年10月30日(星期日)23:49:34 GMT
存储类:COLDLINE
Content-Language:en
Content-Length:43033404
Content-Type:audio / mpeg
... ...

然后我再试了15次,然后在子目录中的其他对象上... 像魅力一样 ☺,虽然操作会覆盖创作&更新时间!



我有两个后续查询:


  1. 是否可以保留创建时间?

gsutil重写操作是否可结算? >

非常感谢。

干杯!

fynali p>

解决方案


是的,它可以作为A类操作进行计费
storage.objects.rewrite,请参阅 cloud.google.com/storage/pricing )。不,
存在无法保存创建/更新时间,因为重写
会创建一个新的对象生成。


- Travis Hobrla in在这里评论


I was trying to change storage class of a set of existing objects (over 300 GBs) as advised in this post:

I tried it on one file first:

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
    ... ...

Then I tried it on 15 more, and then on the rest of the objects in a subdir... Works like a charm ☺, although the operation overwrites the Creation & Update times!

I had two follow-up queries though:

  1. Is gsutil rewrite operation billable?
  2. Can Creation time be preserved?

Many thanks.

Cheers!

fynali

解决方案

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 in comment here

这篇关于这是否是可变更的存储类别的现有对象?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆