doc-exports/docs/obs/umn/obs_03_0335.html
Hasko, Vladimir 342f52c5ae recreating obs_umn_0414 PR due to bug in gitea
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-committed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
2023-05-03 14:54:25 +00:00

49 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 a lifecycle rule for a bucket or for certain objects. With a lifecycle rule, you can transition objects from Standard to Warm or Cold, or from Warm to Cold. However, Cold objects cannot be transitioned to other storage classes using a lifecycle rule. You can also make the objects to be automatically deleted once 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 you want to operate. 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> &gt; <strong id="obs_03_0335__b1979524171017">Lifecycle Rules</strong> in the navigation pane.</p>
</p></li><li id="obs_03_0335__li6653363119435"><span>Click <strong id="obs_03_0335__b175917481148">Create</strong>. A dialog box shown in <a href="#obs_03_0335__fig1529154319415">Figure 1</a> is displayed.</span><p><div class="fignone" id="obs_03_0335__fig1529154319415"><a name="obs_03_0335__fig1529154319415"></a><a name="fig1529154319415"></a><span class="figcap"><b>Figure 1 </b>Creating a lifecycle rule</span></div>
<p id="obs_03_0335__p16233201651818"><span><img id="obs_03_0335__image11715124510230" src="en-us_image_0129609510.png" title="Click to enlarge" class="imgResize"></span></p>
<p id="obs_03_0335__p1823312164186"></p>
<p id="obs_03_0335__p1023321618187"></p>
<p id="obs_03_0335__p112331216161817"></p>
</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">\:*?"&lt;&gt;|</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 you configure to transition objects first to Warm and then Cold, the objects must stay Warm at least 30 days before they can be transitioned to Cold. If only transition to Cold is used, but transition to Warm is not, 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, on January 7, 2015, you saved the following files in OBS:<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">On January 10, 2015, you saved the following files:<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 id="obs_03_0335__p1656615482483">In theory, it takes 24 hours at most to execute a lifecycle rule. Because OBS calculates the lifecycle of an object from the next 00:00 (UTC time) after the object is uploaded, there may be a delay in transitioning objects between storage classes and deleting expired objects. Generally, the delay does not exceed 48 hours. If you make changes to an existing lifecycle rule, the rule will take effect again.</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>