<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.osnexus.com/index.php?action=history&amp;feed=atom&amp;title=Bucket_Lifecycle_Policy</id>
	<title>Bucket Lifecycle Policy - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.osnexus.com/index.php?action=history&amp;feed=atom&amp;title=Bucket_Lifecycle_Policy"/>
	<link rel="alternate" type="text/html" href="https://wiki.osnexus.com/index.php?title=Bucket_Lifecycle_Policy&amp;action=history"/>
	<updated>2026-10-03T06:02:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.osnexus.com/index.php?title=Bucket_Lifecycle_Policy&amp;diff=28150&amp;oldid=prev</id>
		<title>Qadmin: New page: bucket lifecycle policies (6.9), verified on a 6.9.0 cluster; title matches the dialogs&#039; help link</title>
		<link rel="alternate" type="text/html" href="https://wiki.osnexus.com/index.php?title=Bucket_Lifecycle_Policy&amp;diff=28150&amp;oldid=prev"/>
		<updated>2026-09-28T17:40:05Z</updated>

		<summary type="html">&lt;p&gt;New page: bucket lifecycle policies (6.9), verified on a 6.9.0 cluster; title matches the dialogs&amp;#039; help link&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;[[Category:admin_guide]]&lt;br /&gt;
&lt;br /&gt;
A bucket lifecycle policy is an S3 lifecycle rule on an Object Bucket: it deletes objects, or moves them to another storage class, once they reach a given age. This page covers creating, modifying, viewing and deleting those rules from QuantaStor.&lt;br /&gt;
&lt;br /&gt;
== What a lifecycle rule does ==&lt;br /&gt;
&lt;br /&gt;
Each rule QuantaStor manages is one S3 lifecycle rule with three parts:&lt;br /&gt;
&lt;br /&gt;
* a &amp;#039;&amp;#039;&amp;#039;filter&amp;#039;&amp;#039;&amp;#039; that picks the objects -- a key prefix, a minimum size, a maximum size, or any combination; an empty filter selects every object in the bucket,&lt;br /&gt;
* a &amp;#039;&amp;#039;&amp;#039;transition&amp;#039;&amp;#039;&amp;#039;, which moves matching objects to another storage class a number of days after they were written, and&lt;br /&gt;
* an &amp;#039;&amp;#039;&amp;#039;expiration&amp;#039;&amp;#039;&amp;#039;, which deletes matching objects a number of days after they were written.&lt;br /&gt;
&lt;br /&gt;
A transition to a cloud-tier storage class is how objects are tiered from the local cluster to AWS S3, S3 Glacier or another S3 provider; see [[Object Storage Classes and Cloud Tiering]] for the full workflow. A transition to a pool-backed class moves objects between local data pools, for example from flash to high-capacity disk.&lt;br /&gt;
&lt;br /&gt;
QuantaStor writes the whole rule set of the bucket to the object gateway through the S3 PutBucketLifecycleConfiguration call, using the bucket owner&amp;#039;s key, and saves the rule only after the gateway has accepted it. Deleting the last rule removes the bucket&amp;#039;s lifecycle configuration. The gateway then processes the rules in the background, so an object is transitioned or expired some time after it reaches the rule&amp;#039;s age rather than at that exact moment.&lt;br /&gt;
&lt;br /&gt;
Rules that an S3 client put on the bucket directly are picked up by the bucket scan and listed alongside the ones created in QuantaStor. Modifying such a rule in QuantaStor rewrites it with the fields described on this page, so any other settings it carried are dropped.&lt;br /&gt;
&lt;br /&gt;
== Creating a rule ==&lt;br /&gt;
&lt;br /&gt;
{{Navigation|Storage Management &amp;amp;rarr; Object Buckets &amp;#039;&amp;#039;(section)&amp;#039;&amp;#039; &amp;amp;rarr; &amp;#039;&amp;#039;search, then select a bucket&amp;#039;&amp;#039; &amp;amp;rarr; Bucket Lifecycle Policies &amp;#039;&amp;#039;(toolbar group)&amp;#039;&amp;#039; &amp;amp;rarr; Create}}&lt;br /&gt;
&lt;br /&gt;
[[File:objtier_lifecycle_transition.png|thumb|right|641px|Create Bucket Lifecycle Policy with a transition to a cloud-tier storage class after 30 days.]]&lt;br /&gt;
&lt;br /&gt;
Search for buckets in the Object Buckets view and select the one the rule is for; the dialog opens with it filled in. You can also pick a bucket in the dialog with &amp;#039;&amp;#039;&amp;#039;Search...&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Default !! Notes&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Bucket&amp;#039;&amp;#039;&amp;#039; || the selected bucket || The bucket the rule is added to. &amp;#039;&amp;#039;&amp;#039;Search...&amp;#039;&amp;#039;&amp;#039; finds a different one.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Name (Rule Id)&amp;#039;&amp;#039;&amp;#039; || generated, for example {{Code|1=bucket-lifecycle-policy-1}} || The rule&amp;#039;s name. It must be unique within the bucket; the same Rule Id may be used on other buckets.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Enabled&amp;#039;&amp;#039;&amp;#039; || selected || A disabled rule stays on the bucket but is not acted on.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Prefix&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;(Filter)&amp;#039;&amp;#039; || empty || Only objects whose key starts with this prefix. Empty matches every key.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Min Size&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;(Filter)&amp;#039;&amp;#039; || 0 || Only objects larger than this. 0 means no lower limit.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Max Size&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;(Filter)&amp;#039;&amp;#039; || 0 || Only objects smaller than this. 0 means no upper limit.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Expiration&amp;#039;&amp;#039;&amp;#039; / &amp;#039;&amp;#039;&amp;#039;Transition&amp;#039;&amp;#039;&amp;#039; || Expiration || Chooses which of the two sections below the rule uses. The dialog creates one action per rule; the CLI can set both on one rule.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Expiration Days&amp;#039;&amp;#039;&amp;#039; || 30 || 1 to 3650. Matching objects are deleted this many days after they were written.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Transition Days&amp;#039;&amp;#039;&amp;#039; || 30 || 1 to 365. Matching objects move to the storage class below this many days after they were written.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Storage Class&amp;#039;&amp;#039;&amp;#039; || pre-selected || Required for a transition. The dialog pre-selects one of the non-STANDARD classes, so check it before clicking OK. The class the objects move to -- a pool-backed class or a cloud-tier class on the bucket&amp;#039;s Ceph cluster.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The transition storage class must exist on the bucket&amp;#039;s Ceph cluster; any other name is refused with a list of the classes that do. A rule needs a transition, an expiration, or both.&lt;br /&gt;
&lt;br /&gt;
To expire objects some time after they have been tiered, create two rules on the bucket -- a transition rule and a longer expiration rule -- or set both on one rule from the CLI.&lt;br /&gt;
&lt;br /&gt;
== Modifying a rule ==&lt;br /&gt;
&lt;br /&gt;
{{Navigation|Storage Management &amp;amp;rarr; Object Buckets &amp;#039;&amp;#039;(section)&amp;#039;&amp;#039; &amp;amp;rarr; &amp;#039;&amp;#039;search, then select a bucket&amp;#039;&amp;#039; &amp;amp;rarr; Bucket Lifecycle Policies &amp;#039;&amp;#039;(toolbar group)&amp;#039;&amp;#039; &amp;amp;rarr; Modify}}&lt;br /&gt;
&lt;br /&gt;
Choose the rule in &amp;#039;&amp;#039;&amp;#039;Lifecycle Policy Rule&amp;#039;&amp;#039;&amp;#039;. Every other field is the same as in the create dialog. The Name (Rule Id) cannot be changed; to rename a rule, create a new one and delete the old one.&lt;br /&gt;
&lt;br /&gt;
== Viewing rules ==&lt;br /&gt;
&lt;br /&gt;
{{Navigation|Storage Management &amp;amp;rarr; Object Buckets &amp;#039;&amp;#039;(section)&amp;#039;&amp;#039; &amp;amp;rarr; &amp;#039;&amp;#039;search, then select a bucket&amp;#039;&amp;#039; &amp;amp;rarr; Bucket Lifecycle Policies &amp;#039;&amp;#039;(toolbar group)&amp;#039;&amp;#039; &amp;amp;rarr; View}}&lt;br /&gt;
&lt;br /&gt;
[[File:objtier_lifecycle_view.png|thumb|right|800px|View Bucket Lifecycle Policies, listing the rules on the selected bucket.]]&lt;br /&gt;
&lt;br /&gt;
The dialog lists the rules of the selected bucket and shows each rule as the &amp;#039;&amp;#039;&amp;#039;Rules JSON&amp;#039;&amp;#039;&amp;#039; sent to the gateway. The list comes from the bucket scan, so run &amp;#039;&amp;#039;&amp;#039;Rescan Object Storage Buckets&amp;#039;&amp;#039;&amp;#039; with &amp;#039;&amp;#039;&amp;#039;Deep Scan&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Enable Life Cycle Updates&amp;#039;&amp;#039;&amp;#039; selected first; otherwise rules added by an S3 client, or changed outside QuantaStor, do not appear.&lt;br /&gt;
&lt;br /&gt;
== Deleting rules ==&lt;br /&gt;
&lt;br /&gt;
{{Navigation|Storage Management &amp;amp;rarr; Object Buckets &amp;#039;&amp;#039;(section)&amp;#039;&amp;#039; &amp;amp;rarr; &amp;#039;&amp;#039;search, then select a bucket&amp;#039;&amp;#039; &amp;amp;rarr; Bucket Lifecycle Policies &amp;#039;&amp;#039;(toolbar group)&amp;#039;&amp;#039; &amp;amp;rarr; Multi-Delete}}&lt;br /&gt;
&lt;br /&gt;
Select the bucket, tick one or more rules, and confirm. Deleting a rule stops future transitions and expirations; objects that have already moved stay in the class they moved to.&lt;br /&gt;
&lt;br /&gt;
A rule that transitions to a storage class also blocks that class from being deleted until the rule is removed or the class delete is forced; see [[Object Storage Classes and Cloud Tiering#Deleting a storage class|Deleting a storage class]].&lt;br /&gt;
&lt;br /&gt;
== Managing rules from the CLI ==&lt;br /&gt;
&lt;br /&gt;
The {{Code|1=--lifecycle-policy}} argument takes the rule&amp;#039;s UUID, or its Rule Id. A Rule Id is only unique within a bucket, so add {{Code|1=--bucket}} when the same Rule Id is used on more than one bucket; the command reports the matching buckets if it cannot tell which one you mean.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Command !! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| qs bucket-lifecycle-policy-create || Add a rule to {{Code|1=--bucket}}, with {{Code|1=--rule-id}} and the filter, transition and expiration arguments&lt;br /&gt;
|-&lt;br /&gt;
| qs bucket-lifecycle-policy-modify || Change a rule&lt;br /&gt;
|-&lt;br /&gt;
| qs bucket-lifecycle-policy-get || Show one rule&lt;br /&gt;
|-&lt;br /&gt;
| qs bucket-lifecycle-policy-list || List rules, optionally for one {{Code|1=--bucket}} or {{Code|1=--ceph-cluster}}&lt;br /&gt;
|-&lt;br /&gt;
| qs bucket-lifecycle-policy-delete || Delete a rule&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Sizes are in bytes, and 0 leaves a filter or an action unset.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;font-size: smaller&amp;quot;&amp;gt;&lt;br /&gt;
qs bucket-lifecycle-policy-create --bucket=media --rule-id=logs-to-cloud --prefix=logs/ --min-size=1048576 --transition-days=30 --transition-storage-class=AWS_IA --expiration-days=365&lt;br /&gt;
qs bucket-lifecycle-policy-modify --lifecycle-policy=logs-to-cloud --bucket=media --rule-status-enabled=false&lt;br /&gt;
qs bucket-lifecycle-policy-list --bucket=media&lt;br /&gt;
qs bucket-lifecycle-policy-delete --lifecycle-policy=logs-to-cloud --bucket=media&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Related pages ==&lt;br /&gt;
&lt;br /&gt;
* [[Object Storage Classes and Cloud Tiering]] -- the storage classes a transition moves objects to, including cloud tiers&lt;br /&gt;
* [[Bucket Rate Limits]] -- limiting the request and bandwidth rate of a bucket&lt;br /&gt;
* [[Scale-out Object Setup (ceph)]] -- object gateways, users and buckets&lt;br /&gt;
* [[Bucket Synchronization Policies]] -- replicating buckets between QuantaStor zones&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;small&amp;gt;&amp;#039;&amp;#039;Verified against QuantaStor 6.9.0.&amp;#039;&amp;#039;&amp;lt;/small&amp;gt;&lt;/div&gt;</summary>
		<author><name>Qadmin</name></author>
	</entry>
</feed>