如何删除或清除在S3上的旧文件? [英] How to delete or purge old files on S3?

查看:1513
本文介绍了如何删除或清除在S3上的旧文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有现有的解决方案,以删除早于X天的文件?

Are there existing solutions to delete any files older than x days?

推荐答案

亚马逊公司推出的对象到期最近。

Amazon has introduced object expiration recently.

亚马逊S3宣布对象过期

Amazon S3 Announces Object Expiration

亚马逊S3宣布了一项新的   功能,对象过期,可以让你安排的缺失   经过pre-规定的时间内你的对象。使用对象过期   安排定期清除对象的省去了你   以确定删除的对象,并提交删除请求亚马逊   S3。

Amazon S3 announced a new feature, Object Expiration that allows you to schedule the deletion of your objects after a pre-defined time period. Using Object Expiration to schedule periodic removal of objects eliminates the need for you to identify objects for deletion and submit delete requests to Amazon S3.

您可以为一组对象的定义对象过期规则   你的水桶。每个对象过期规则允许您指定   preFIX和天有效期。在preFIX领域(例如   日志/ )标识对象(S)受到期规则,   保质期规定,从创立至今的天数   (即年龄),之后对象(多个)应被删除。一旦对象   都超过其到期日期,它们将被排队为删除。您   不会被收取存储或物体后,他们   到期日期

You can define Object Expiration rules for a set of objects in your bucket. Each Object Expiration rule allows you to specify a prefix and an expiration period in days. The prefix field (e.g. logs/) identifies the object(s) subject to the expiration rule, and the expiration period specifies the number of days from creation date (i.e. age) after which object(s) should be removed. Once the objects are past their expiration date, they will be queued for deletion. You will not be billed for storage for objects on or after their expiration date.

这篇关于如何删除或清除在S3上的旧文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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