By sarsonj
Hi,
I have about 16mil files (1 TB total) in DO space and I wanted to set expiration policy to delete all files older than 40 days. According to docs, DO Spaces should support LifecycleConfiguration, so that I set it for bucket using s3cmd:
s3cmd expire s3://mybucket --expiry-days 40
The command was accepted and the rule was set:
s3cmd getlifecycle s3://mybucket
<?xml version="1.0" ?>
<LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Rule>
<ID>bqwrg54gdyz5sn8gwkq9c6yqlcdvmalfkelpg82u6vl1nhrs</ID>
<Prefix/>
<Status>Enabled</Status>
<Expiration>
<Days>40</Days>
</Expiration>
</Rule>
</LifecycleConfiguration>
However, 2 months passed and I checked the bucket again and I still can see files older than half year. So is this feature working? Is it limited to some specific datacenter or so?
Thanks,
Jindrich
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I set like
<LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Rule>
<ID>Expire 180</ID>
<Prefix></Prefix>
<Status>Enabled</Status>
<Expiration>
<Days>180</Days>
</Expiration>
</Rule>
<Rule>
<ID>Remove uncompleted uploads</ID>
<Status>Enabled</Status>
<Prefix/>
<AbortIncompleteMultipartUpload>
<DaysAfterInitiation>1</DaysAfterInitiation>
</AbortIncompleteMultipartUpload>
</Rule>
</LifecycleConfiguration>
s3cmd setlifecycle do_s3.xml s3://mybucket
ref: https://developers.digitalocean.com/documentation/spaces/#create-bucket-lifecycle
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.