doc-exports/docs/obs/tool/obs_03_1052.html
zhangyue a6723418da OBS TOOL DOC
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2023-07-31 14:32:59 +00:00

29 lines
7.1 KiB
HTML

<a name="obs_03_1052"></a><a name="obs_03_1052"></a>
<h1 class="topictitle1">Configuring a Lifecycle Rule</h1>
<div id="body0000001242946639"><p class="MsoNormal" id="obs_03_1052__en-us_topic_0045829131_p65625740">Configure a lifecycle rule for a bucket to manage objects in the bucket.</p>
<div class="section" id="obs_03_1052__section1486815665420"><h4 class="sectiontitle">Procedure</h4><ol id="obs_03_1052__en-us_topic_0045829131_ol38468094"><li id="obs_03_1052__en-us_topic_0045829131_li10668534"><span>Log in to OBS Browser+.</span></li><li id="obs_03_1052__en-us_topic_0045829131_li28907944"><span>Select the bucket you want and choose <strong id="obs_03_1052__en-us_topic_0068417486_en-us_topic_0045853854_b29889157">More</strong> &gt; <strong id="obs_03_1052__en-us_topic_0068417486_en-us_topic_0045853854_b566959">Lifecycle Rules</strong>.</span><p><p id="obs_03_1052__p776213810261"></p>
<p id="obs_03_1052__p1631611912518"></p>
</p></li><li id="obs_03_1052__en-us_topic_0045829131_li15376366"><span>Click <strong id="obs_03_1052__b15649102616162">Create</strong>.</span><p><p id="obs_03_1052__p2477834289"></p>
</p></li><li id="obs_03_1052__en-us_topic_0045829131_li11426136"><span>Configure related parameters.</span><p><ul id="obs_03_1052__en-us_topic_0045829131_ul35726366"><li id="obs_03_1052__en-us_topic_0045829131_li53101844"><strong id="obs_03_1052__b133766220245">Status</strong>: Select <strong id="obs_03_1052__b27413301243">Enable</strong> to enable this lifecycle rule after the configuration.</li><li id="obs_03_1052__li939853023118"><strong id="obs_03_1052__b47001343192417">Rule Name</strong>: Enter a rule name that is no longer than 255 characters.</li><li id="obs_03_1052__li3498245115437"><strong id="obs_03_1052__b18680205772612">Applies To</strong>: By selecting <strong id="obs_03_1052__b81123538119">Object name prefix</strong>, the lifecycle rule will apply to objects with the specified prefix contained in their name. You can also select <strong id="obs_03_1052__b311824561420">Bucket</strong> for the lifecycle rule to apply to all objects in the bucket.</li></ul>
<div class="note" id="obs_03_1052__en-us_topic_0045829131_note6282141"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="obs_03_1052__en-us_topic_0045829131_ul56539274"><li id="obs_03_1052__en-us_topic_0045829131_li39091418">If <strong id="obs_03_1052__b1683214432711">Object name prefix</strong> is selected and the specified prefix and the prefix in an existing lifecycle rule overlap, OBS regards the two rules as one and forbids you to configure the current rule. For example, if there is a rule with prefix <strong id="obs_03_1052__b52781517182">abc</strong> in the system, another rule whose prefix contains <strong id="obs_03_1052__b192615017190">abc</strong> cannot be configured.</li><li id="obs_03_1052__en-us_topic_0045829131_li16278448">If there is already a lifecycle rule whose <strong id="obs_03_1052__b12429154213103">Applies To</strong> is set to <strong id="obs_03_1052__b443517424107">Object name prefix</strong>, you are not allowed to configure a new rule whose <strong id="obs_03_1052__b6436194241019">Applies To</strong> is set to <strong id="obs_03_1052__b194368429103">Bucket</strong>.</li><li id="obs_03_1052__en-us_topic_0045829131_li12288308">If there is already a lifecycle rule whose <strong id="obs_03_1052__b534711116278">Applies To</strong> is set to <strong id="obs_03_1052__b634741118275">Bucket</strong>, you are not allowed to configure a new rule whose <strong id="obs_03_1052__b1734751115271">Applies To</strong> is set to <strong id="obs_03_1052__b73476118272">Object name prefix</strong>.</li></ul>
</div></div>
<ul id="obs_03_1052__en-us_topic_0045829131_ul43485911"><li id="obs_03_1052__li60610947104121">You can use a lifecycle rule to specify the number of days after which objects that have been last updated and meet specified conditions are automatically transitioned to the Warm or Cold storage class, or are automatically deleted upon expiration.<ul id="obs_03_1052__ul6734890111214"><li id="obs_03_1052__li54662143111210"><strong id="obs_03_1052__b192921852172615">Transition to </strong><strong id="obs_03_1052__b13410582140">Warm</strong>: This rule transitions the objects meeting the conditions to the Warm storage class after the specified number of days since the last object update.</li><li id="obs_03_1052__li33271183111"><strong id="obs_03_1052__b979659102718">Transition to </strong><strong id="obs_03_1052__b10845316157">Cold</strong>: This rule transitions the objects meeting the conditions to the Cold storage class after the specified number of days since the last object update.</li><li id="obs_03_1052__li13511407111232"><strong id="obs_03_1052__b1047711366271">Expiration Time</strong>: This determines when an object will expire and then be deleted, or the day after which objects matching the rule will be deleted.</li></ul>
</li></ul>
<p class="MsoNormal" id="obs_03_1052__en-us_topic_0045829131_p50958431">For example, on January 7, 2022, you saved the following files in OBS:</p>
<ul id="obs_03_1052__en-us_topic_0045829131_ul55972696"><li id="obs_03_1052__en-us_topic_0045829096_li28459613">log/test1.log</li><li id="obs_03_1052__en-us_topic_0045829096_li54809927">log/test2.log</li><li id="obs_03_1052__en-us_topic_0045829096_li23527303">doc/example.doc</li><li id="obs_03_1052__en-us_topic_0045829096_li10419141">doc/good.txt</li></ul>
<p class="MsoNormal" id="obs_03_1052__en-us_topic_0045829131_p20174219">On January 10, 2022, you saved the following files in OBS:</p>
<ul id="obs_03_1052__en-us_topic_0045829131_ul47350245"><li id="obs_03_1052__en-us_topic_0045829096_li12252614">log/clientlog.log</li><li id="obs_03_1052__en-us_topic_0045829096_li43164662">log/serverlog.log</li><li id="obs_03_1052__en-us_topic_0045829096_li52937641">doc/work.doc</li><li id="obs_03_1052__en-us_topic_0045829096_li6676729">doc/travel.txt<p id="obs_03_1052__p14795999161535"><a name="obs_03_1052__en-us_topic_0045829096_li6676729"></a><a name="en-us_topic_0045829096_li6676729"></a>If you configure a rule on January 10, 2022 and the rule will make the objects with <strong id="obs_03_1052__b986133012430">log/</strong> as their prefix expired and deleted one day later, objects <strong id="obs_03_1052__b413815112322">log/test1.log</strong>, <strong id="obs_03_1052__b14138111153215">log/test2.log</strong>, <strong id="obs_03_1052__b2139121123212">log/clientlog.log</strong>, and <strong id="obs_03_1052__b1313912113211">log/serverlog.log</strong> will be deleted from the files above on January 12, 2022.</p>
</li></ul>
</p></li><li id="obs_03_1052__en-us_topic_0045829131_li55582327"><span>Click <strong id="obs_03_1052__b381411366272">OK</strong> to save the lifecycle rule.</span></li></ol>
</div>
<div class="section" id="obs_03_1052__en-us_topic_0045829131_section10471"><h4 class="sectiontitle">Related Operations</h4><p class="MsoNormal" id="obs_03_1052__p23496307">After the configuration is complete, you can edit, delete, enable, or disable the configured rule if necessary.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_1050.html">Lifecycle Management</a></div>
</div>
</div>