0

GCS offers lifecycle management where you can, for example, "Downgrade the storage class of objects older than 365 days to Coldline Storage". I'd like to archive rarely used objects but keep frequently used objects in standard (hot) storage. Does anyone know of a way to do that? Ideally there would be a parameter like days-since-last-access, then the rule could trigger object archival when that parameter hits a threshold defined in the policy.

1 Answers1

1

No, you can't. According to the documentation you can only set the condition of an object's lifecycle rule according to:

  • Age: When an object reaches the specified age (in days).
  • CreatedBefore: When an object is created before midnight of the specified date in UTC.
  • IsLive: Whether the version of an object is the live version or not.
  • MatchesStorageClass: Is the storage class of the object.
  • NumberOfNewerVersions: Is the amount of more up-to-date versions.

Currently, there's no way to create a rule with a condition based on the last access of an object. Regardless, you can still change an object's storage class manually with gsutil and the REST API's.

Ajordat
  • 135
  • 5