forked from docs/doc-exports
Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: Jawei, Li <lijiawei5@huawei.com> Co-committed-by: Jawei, Li <lijiawei5@huawei.com>
45 lines
12 KiB
HTML
45 lines
12 KiB
HTML
<a name="obs_03_0335"></a><a name="obs_03_0335"></a>
|
|
|
|
<h1 class="topictitle1">Configuring a Lifecycle Rule</h1>
|
|
<div id="body1499753333227"><p class="MsoNormal" id="obs_03_0335__p42021820">You can configure the lifecycle rule for a bucket or an object. You can transition the storage class of an object from Standard to Warm or Cold, or from Warm to Cold. However, an object in the Cold storage class cannot be transitioned to other storage classes by configuring the lifecycle rule. You can also specify an expiration time of objects, so the objects are automatically deleted after they expire.</p>
|
|
<div class="section" id="obs_03_0335__section4422459618019"><h4 class="sectiontitle">Procedure</h4><ol id="obs_03_0335__ol409287161832"><li id="obs_03_0335__li99821455306"><span>In the bucket list, click the bucket to be operated. The <strong id="obs_03_0335__obs_03_0307_b1395123914108">Overview</strong> page of the bucket is displayed.</span></li><li id="obs_03_0335__li18830181855820"><span>In the right <strong id="obs_03_0335__b565584411338">Basic Configurations</strong> area, click <strong id="obs_03_0335__b1216512105344">Lifecycle Rules</strong>. The <strong id="obs_03_0335__b7670431173413">Lifecycle Rules</strong> page is displayed.</span><p><p id="obs_03_0335__p471425117139">Alternatively, you can choose <strong id="obs_03_0335__b353920571292">Basic Configurations</strong> > <strong id="obs_03_0335__b1979524171017">Lifecycle Rules</strong> in the navigation pane on the left.</p>
|
|
</p></li><li id="obs_03_0335__li6653363119435"><span>Click <strong id="obs_03_0335__b175917481148">Create</strong>. A dialog box is displayed in <a href="#obs_03_0335__fig30958876193536">Figure 1</a>.</span><p><div class="fignone" id="obs_03_0335__fig30958876193536"><a name="obs_03_0335__fig30958876193536"></a><a name="fig30958876193536"></a><span class="figcap"><b>Figure 1 </b>Creating a lifecycle rule</span><br><span><img id="obs_03_0335__image11715124510230" src="en-us_image_0129609510.png" title="Click to enlarge" class="imgResize"></span></div>
|
|
</p></li><li id="obs_03_0335__li39098515"><span>Configure a lifecycle rule.</span><p><div class="p" id="obs_03_0335__p5509517915252"><strong id="obs_03_0335__b264519183425">Basic Information</strong>:<ul id="obs_03_0335__ul16342320"><li id="obs_03_0335__li6267879315835"><strong id="obs_03_0335__b5881289715835">Status</strong>: <p id="obs_03_0335__p885822615835">Select <strong id="obs_03_0335__b19429790191407">Enable</strong> to enable the lifecycle rule.</p>
|
|
</li><li id="obs_03_0335__li5729884015841"><strong id="obs_03_0335__b2914155715841">Rule Name</strong>: <p id="obs_03_0335__p2310122815842">Identify lifecycle rules. The <strong id="obs_03_0335__b1095408517145111">Rule Name</strong> contains a maximum of 255 characters.</p>
|
|
</li><li id="obs_03_0335__li61432666143253"><strong id="obs_03_0335__b1443569572145115">Applies To</strong>: Can be set to <strong id="obs_03_0335__b948338085145115">Object name prefix</strong> or <strong id="obs_03_0335__b405387834145115">Bucket</strong>.<ul id="obs_03_0335__ul4702430145854"><li id="obs_03_0335__li34845172143258"><strong id="obs_03_0335__b1919975112496">Object name prefix</strong>: Objects that have the specified prefix will be managed by the lifecycle rule. The prefix cannot start with a slash (/), cannot have consecutive slashes (/), and cannot contain the following special characters: <strong id="obs_03_0335__b630544719504">\:*?"<>|</strong></li><li id="obs_03_0335__li43762555113418"><strong id="obs_03_0335__b261482711145141">Bucket</strong>: All objects in the bucket will be managed by the lifecycle rule.</li></ul>
|
|
</li></ul>
|
|
<div class="note" id="obs_03_0335__note35283025"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="obs_03_0335__ul49111773"><li id="obs_03_0335__li39352775">When <strong id="obs_03_0335__b9793193455">Object name prefix</strong> is selected and the specified prefix and the prefix of an existing lifecycle rule overlap, OBS regards the two rules as one and disables the one to be configured. For example, if a rule with prefix <strong id="obs_03_0335__b54296197">abc</strong> exists in the system, another rule whose prefix starts with <strong id="obs_03_0335__b18903728">abc</strong> cannot be configured.</li><li id="obs_03_0335__li18630656">If a lifecycle rule whose <strong id="obs_03_0335__b271524188145347">Applies To</strong> is set to <strong id="obs_03_0335__b1093346387145347">Object name prefix</strong> has been configured, you cannot configure a lifecycle rule whose <strong id="obs_03_0335__b1811847536145347">Applies To</strong> is set to <strong id="obs_03_0335__b1291855916145347">Bucket</strong>.</li><li id="obs_03_0335__li33458177">If a lifecycle rule has been configured for the entire bucket, no more rules that apply to object name prefix can be added.</li></ul>
|
|
</div></div>
|
|
</div>
|
|
<p id="obs_03_0335__p4329302814373"><strong id="obs_03_0335__b1106642753145428">Current Version</strong> or <strong id="obs_03_0335__b49163472145428">Historical Version</strong>:</p>
|
|
<div class="note" id="obs_03_0335__note16805850"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="obs_03_0335__ul3456553515453"><li class="NotesText" id="obs_03_0335__li6309484515453"><strong id="obs_03_0335__b55775843115041">Current Version</strong> and <strong id="obs_03_0335__b10717756115044">Historical Version</strong> are two concepts for <strong id="obs_03_0335__b170174764414158">Versioning</strong>. If <strong id="obs_03_0335__b101700759114156">Versioning</strong> is enabled, uploading objects with the same name to the same path generates different versions. The object uploaded lastly is called <strong id="obs_03_0335__b18681102115049">Current Version</strong>, and the object uploaded earlier is called <strong id="obs_03_0335__b6701786115051">Historical Version</strong>.</li><li id="obs_03_0335__li555179501550">You can configure either the <strong id="obs_03_0335__b1735055012614">Current Version</strong> or <strong id="obs_03_0335__b111680576617">Historical Version</strong>, or both of them.</li></ul>
|
|
</div></div>
|
|
<ul id="obs_03_0335__ul944841515351"><li id="obs_03_0335__li53535400204050"><strong id="obs_03_0335__b125316048314562">Transition to Warm</strong>: You can specify the number of days after which objects that have been last updated and meet specified conditions are automatically transitioned to <strong id="obs_03_0335__b189775300114562">Warm</strong>. This number must be at least 30.</li><li id="obs_03_0335__li40553341204057"><strong id="obs_03_0335__b14315176105017">Transition to Cold</strong>: You can specify the number of days after which objects that have been last updated and meet specified conditions are automatically transitioned to <strong id="obs_03_0335__b11208164211511">Cold</strong>. If objects are configured to be transitioned to both <strong id="obs_03_0335__b16694849185111">Warm</strong> and <strong id="obs_03_0335__b199115317517">Cold</strong>, the number of days for transition to <strong id="obs_03_0335__b930823145214">Cold</strong> must be at least 30 days later than that for transition to <strong id="obs_03_0335__b7245135975112">Warm</strong>. If only transition to Cold is enabled and transition to <strong id="obs_03_0335__b1074062413145649">Warm</strong> is disabled, there is no limit on the number of days for transition.</li><li id="obs_03_0335__li3114893515420">Object deletion upon expiration: You can specify the number of days after which objects that have been last updated and meet the specified conditions are automatically deleted. The expiration time must be greater than the two transition times.</li></ul>
|
|
<div class="p" id="obs_03_0335__p50988061113345">For example, the following files are stored in OBS on January 7, 2015:<ul id="obs_03_0335__ul466294043312"><li id="obs_03_0335__li28459613">log/test1.log</li><li id="obs_03_0335__li54809927">log/test2.log</li><li id="obs_03_0335__li23527303">doc/example.doc</li><li id="obs_03_0335__li10419141">doc/good.txt</li></ul>
|
|
</div>
|
|
<div class="MsoNormal" id="obs_03_0335__p26663410">The following files are stored in OBS on January 10, 2015:<ul id="obs_03_0335__ul1877348103412"><li id="obs_03_0335__li12252614">log/clientlog.log</li><li id="obs_03_0335__li43164662">log/serverlog.log</li><li id="obs_03_0335__li52937641">doc/work.doc</li><li id="obs_03_0335__li19422124114310">doc/travel.txt</li></ul>
|
|
</div>
|
|
<p id="obs_03_0335__p513573918258">On January 10, 2015, you set the expiration time of objects prefixed with <strong id="obs_03_0335__b1466203810337">log</strong> to one day later, you may encounter the following situations:</p>
|
|
<ul id="obs_03_0335__ul144381629142811"><li id="obs_03_0335__li343932952810">Objects <strong id="obs_03_0335__b86511511153712">log/test1.log</strong> and <strong id="obs_03_0335__b0309616103717">log/test2.log</strong> uploaded on January 7, 2015 may be deleted after the last system scan. The deletion may happen on January 10, 2015 or January 11, 2015, depending on the time of the last system scan.</li><li id="obs_03_0335__li49041356113017">Objects <strong id="obs_03_0335__b15317154311425">log/clientlog.log</strong> and <strong id="obs_03_0335__b93695478426">log/serverlog.log</strong> uploaded on January 10, 2015 are usually deleted on January 11, 2015 or January 12, 2015, depending on the time of the last system scan. If the objects have been stored for more than one day at the time of the last system scan, the objects are deleted upon the scan. Or, they are deleted at the next system scan or later whenever their storage duration meets the specified expiration time requirement.</li></ul>
|
|
<p id="obs_03_0335__p182057154316">On the day of operation, you can set the objects with the name prefix <strong id="obs_03_0335__b164031732111017">log</strong> to be transitioned to <strong id="obs_03_0335__b8404123211010">Warm</strong> 30 days later, transitioned to <strong id="obs_03_0335__b104045322101">Cold</strong> 60 days later, and deleted 100 days later, then OBS will transition <strong id="obs_03_0335__b8404123201014">log/clientlog.log</strong>, <strong id="obs_03_0335__b17404123211013">log/serverlog.log</strong>, <strong id="obs_03_0335__b340433291011">log/test1.log</strong>, and <strong id="obs_03_0335__b1940443211020">log/test2.log</strong> to <strong id="obs_03_0335__b20404133212104">Warm</strong> when their storage duration exceeds 30 days, transition them to <strong id="obs_03_0335__b11404183261014">Cold</strong> when their storage duration exceeds 60 days, and delete them when their storage duration exceeds 100 days, respectively.</p>
|
|
<div class="note" id="obs_03_0335__note8551937154317"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p class="NotesText" id="obs_03_0335__p655103724317">The storage class transition and deletion of an object may be delayed after the time condition is met. Generally, the delay does not exceed 48 hours. If you change the configurations of an existing lifecycle rule, the effective time of the lifecycle rule will change according to the new configurations.</p>
|
|
</div></div>
|
|
</p></li><li id="obs_03_0335__li56738760"><span>Click <strong id="obs_03_0335__b11589310155211">OK</strong> to complete the lifecycle rule configuration.</span></li></ol>
|
|
</div>
|
|
<div class="section" id="obs_03_0335__section1589011665116"><h4 class="sectiontitle">Follow-up Procedure</h4><p id="obs_03_0335__p441791955212">You can click <strong id="obs_03_0335__b1727825621111">Edit</strong> under the <strong id="obs_03_0335__b7279175621118">Operation</strong> column of a lifecycle rule, to edit the rule. Also you can click <strong id="obs_03_0335__b202801456151112">Disable</strong> or <strong id="obs_03_0335__b3879194071212">Enable</strong> to disable or enable it.</p>
|
|
<p id="obs_03_0335__p2714114510553">If you want to delete more than one lifecycle rule at a time, select them and click <strong id="obs_03_0335__b1954631191319">Delete</strong> above the list.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_0334.html">Lifecycle Management</a></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script language="JavaScript">
|
|
<!--
|
|
image_size('.imgResize');
|
|
var msg_imageMax = "view original image";
|
|
var msg_imageClose = "close";
|
|
//--></script> |