ECS - S3 Interface - how to increase the retention-period

Hello Everyone, dear Community

I want to change the retention-time of a file after it was written.

For a new file, the header called "x-emc-retention-period", is set to seconds from the archiving date  (or -1 for forever)!

What i do for increasing the retention-time is, i call  "CopyObject" with the same bucket and key, setting "S3MetadataDirective.REPLACE" and finally add "x-emc-retention-period" (calculated from now again) .
Is this the correct way?


BTW: When i calculate the time how long the retention-period is (for a nicer error messages), i use the value from "x-emc-mtime" and add "x-emc-retention-period". Is that correct too?

Thank you,

Christoph

PS: I use the .NET Framework with the Amazon S3 SDK. But that's not really relevant for the question.

Tags (3)
0 Kudos
5 Replies
JasonCwik
2 Iron

Re: ECS - S3 Interface - how to increase the retention-period

Hi Christoph,

When you use per-object retention with x-emc-retention-period, the object is frozen until the retention period expires.  This means that the object cannot be deleted or overwritten, including metadata updates through CopyObject.

The only ways to modify retention are to use x-emc-retention-policy and modify the namespace policy or use bucket-level retention and change the bucket's retention.

0 Kudos

Re: ECS - S3 Interface - how to increase the retention-period

Hello Jason,

Thank you for your answer!
During my testing i started without a retention period and so i was able to "once" set it...

In the Centera-SDK, i solved this task by changing the MetaData, Which was allowed, but created a new CDF with a new Clip-ID, which pointed to the same blob as the original. In the new CDF there was a field called "prev.clip", which contained the ID of the original. During deleting, i used this field to deleted all previous clips as well.

If I would do the same for ECS:

  • Copy the existing (protected) object to a new object
    • Keeping a reference to the copied item (in the metadata)
    • protect the new object with a longer retention-period.
    • remember the ID of the new object, instead of the old one
  • During Delete:
    • check if there is a reference to a prev. object, delete that one first (in a loop)
    • delete the object

Would that cause the underlying data to be duplicated as well?

Is that a good or at least acceptable solution?

The problem behind, is that a user has files, where he does not know at the start, how important they are (and how long they need to have protection). Later it's also possible to increase the retention for another year(s)... (e.g. because a contract was renewed and all data in the contract must be protected longer).

Thank you!

Christoph

0 Kudos
Highlighted

Re: ECS - S3 Interface - how to increase the retention-period

Update:
I've tested the "CopyObject" and set the retention-period of the copy, but it seems not to work!

The copy get's the original-value of "x-emc-retention-period" and the value i set in the header is ignored.

(in the call i use "MetadataDirective = S3MetadataDirective.REPLACE", so i though that i should be able to set it)


Is that intended???


Thank you!

Christoph


0 Kudos
benschumacher
2 Bronze

Re: ECS - S3 Interface - how to increase the retention-period

Hi Christoph,

I did some testing on this and it appears we have a couple issues on our end that need to get resolved.  If you're trying to use PUT COPY with metadata directive REPLACE and the destination key is different (meaning you're in fact creating a new object), the original object's retention should not carry over to the new object.  Furthermore, you should be able to specify a new retention period as you're creating a brand new object (source key is different than destination key).  It appears we also have a regression in that I can't even specify a retention period using PUT COPY when original object never had a retention period set.  I'm looking into these issues internally and will update this post once I have more information.

Ben

0 Kudos
benschumacher
2 Bronze

Re: ECS - S3 Interface - how to increase the retention-period

Christoph,

Just wanted to let you know a fix has been implemented and is slated for release in ECS 3.2.

Thanks,

Ben

0 Kudos