forked from docs/doc-exports
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
215 lines
16 KiB
HTML
215 lines
16 KiB
HTML
<a name="obs_04_0087"></a><a name="obs_04_0087"></a>
|
|
|
|
<h1 class="topictitle1">Restoring Cold Objects</h1>
|
|
<div id="body58597509"><div class="section" id="obs_04_0087__section5584184924715"><h4 class="sectiontitle">Functions</h4><p class="msonormal" id="obs_04_0087__p13952829">To obtain the content of an object in the Cold storage class, you need to restore the object first and then you can download it. After an object is restored, a copy of the object is saved in the Standard storage class. By doing so, the object in the Cold storage class and its copy in the Standard storage class co-exist in the bucket. The copy will be automatically deleted once its retention period expires.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0087__section58466603"><h4 class="sectiontitle">Versioning</h4><p class="msonormal" id="obs_04_0087__p48777806">By default, this operation returns the latest version of an object. If the object has a delete marker, status code 404 is returned. To restore an object of a specified version, the <strong id="obs_04_0087__b1866401892947">versionId</strong> parameter can be used to specify the desired version.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0087__section56437387"><h4 class="sectiontitle">Request Syntax</h4><pre class="screen" id="obs_04_0087__screen41581266">POST /ObjectName?restore&versionId=VersionID HTTP/1.1
|
|
Host: <em id="obs_04_0087__i123441746202313">bucketname</em>.obs.<em id="obs_04_0087__i034434682311">region</em>.example.com
|
|
Date: <em id="obs_04_0087__i49616010">date</em>
|
|
Authorization: <em id="obs_04_0087__i59473860">authorization string</em>
|
|
Content-MD5: <em id="obs_04_0087__i52653375">MD5</em>
|
|
|
|
<RestoreRequest>
|
|
<Days><em id="obs_04_0087__i49474582">NumberOfDays</em></Days>
|
|
<RestoreJob>
|
|
<Tier><em id="obs_04_0087__i29511006">RetrievalOption</em></Tier>
|
|
</RestoreJob>
|
|
</RestoreRequest></pre>
|
|
</div>
|
|
<div class="section" id="obs_04_0087__section38174436"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0087__table12639379" frame="border" border="1" rules="all"><thead align="left"><tr id="obs_04_0087__row23833904"><th align="left" class="cellrowborder" valign="top" width="22.220000000000002%" id="mcps1.3.4.2.1.4.1.1"><p id="obs_04_0087__p51498034">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="62.629999999999995%" id="mcps1.3.4.2.1.4.1.2"><p id="obs_04_0087__p28212312">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.15%" id="mcps1.3.4.2.1.4.1.3"><p id="obs_04_0087__p31463509">Mandatory</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0087__row52775916"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_04_0087__p46990831">versionId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.629999999999995%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_04_0087__p48160946">Version ID of the Cold object to be restored</p>
|
|
<p id="obs_04_0087__p30795331">Type: string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.15%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_04_0087__p11393865">No</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0087__section8025609"><h4 class="sectiontitle">Request Headers</h4><p class="msonormal" id="obs_04_0087__p50487909">This request uses common headers. For details, see <a href="obs_04_0007.html#obs_04_0007__table25197309">Table 3</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0087__section5121617"><h4 class="sectiontitle">Request Elements</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0087__table30028258" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request elements</caption><thead align="left"><tr id="obs_04_0087__row54669016"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.6.2.2.4.1.1"><p id="obs_04_0087__p66114166">Element</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.6.2.2.4.1.2"><p id="obs_04_0087__p53647233">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.6.2.2.4.1.3"><p id="obs_04_0087__p50458592">Mandatory</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0087__row60614140"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.2.2.4.1.1 "><p id="obs_04_0087__p10798268">RestoreRequest</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.2.2.4.1.2 "><p id="obs_04_0087__p2244488">Container for the restore information</p>
|
|
<p id="obs_04_0087__p20200399">Type: container</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.2.2.4.1.3 "><p id="obs_04_0087__p25619609">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0087__row29249895"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.2.2.4.1.1 "><p id="obs_04_0087__p20431305">Days</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.2.2.4.1.2 "><p id="obs_04_0087__p44323032">Indicates the storage duration of the restored object. The minimum value is 1 and the maximum value is 30.</p>
|
|
<p id="obs_04_0087__p63362971">Type: integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.2.2.4.1.3 "><p id="obs_04_0087__p32127064">Yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0087__row20708123"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.2.2.4.1.1 "><p id="obs_04_0087__p66745247">RestoreJob</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.2.2.4.1.2 "><p id="obs_04_0087__p37655920">Container for the restore options</p>
|
|
<p id="obs_04_0087__p3358960">Type: container</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.2.2.4.1.3 "><p id="obs_04_0087__p3640350">No</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0087__row32763158"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.2.2.4.1.1 "><p id="obs_04_0087__p36570173">Tier</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.2.2.4.1.2 "><p id="obs_04_0087__p9393999">Restore options: <strong id="obs_04_0087__b73716351645">Expedited</strong> | <strong id="obs_04_0087__b178334417418">Standard</strong></p>
|
|
<p id="obs_04_0087__p17437133"><strong id="obs_04_0087__b11741217382">Expedited</strong> indicates that objects can be quickly restored from Archive storage within 1 to 5 minutes.</p>
|
|
<p id="obs_04_0087__p22716470"><strong id="obs_04_0087__b854013204398">Standard</strong> indicates that objects can be restored from Archive storage within 3 to 5 hours.</p>
|
|
<p id="obs_04_0087__p3121645">The default value is <strong id="obs_04_0087__b106617291510">Standard</strong>.</p>
|
|
<p id="obs_04_0087__p28094810">Type: string</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.6.2.2.4.1.3 "><p id="obs_04_0087__p61087138">No</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0087__section46094559"><h4 class="sectiontitle">Response Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0087__screen939498136"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>status_code
|
|
Date:<span class="w"> </span>date
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0087__section12197851"><h4 class="sectiontitle">Response Headers</h4><p class="msonormal" id="obs_04_0087__p1512332591013">The response to the request uses common headers. For details, see <a href="obs_04_0013.html#obs_04_0013__d0e686">Table 1</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0087__section42671798"><h4 class="sectiontitle">Response Elements</h4><p class="msonormal" id="obs_04_0087__p522982">This response contains no elements.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0087__section48501865"><h4 class="sectiontitle">Error Responses</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0087__table42361618" frame="border" border="1" rules="all"><caption><b>Table 2 </b>List of OBS access error codes</caption><thead align="left"><tr id="obs_04_0087__row29259155"><th align="left" class="cellrowborder" valign="top" width="25.509999999999998%" id="mcps1.3.10.2.2.4.1.1"><p id="obs_04_0087__p21181321">Error Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="53.059999999999995%" id="mcps1.3.10.2.2.4.1.2"><p id="obs_04_0087__p37965440">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="21.43%" id="mcps1.3.10.2.2.4.1.3"><p id="obs_04_0087__p55301791">HTTP Status Code</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0087__row50260111"><td class="cellrowborder" valign="top" width="25.509999999999998%" headers="mcps1.3.10.2.2.4.1.1 "><p id="obs_04_0087__p44537208">RestoreAlreadyInProgress</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.059999999999995%" headers="mcps1.3.10.2.2.4.1.2 "><p id="obs_04_0087__p50744065">The object is being restored. The request conflicts with another.</p>
|
|
<p id="obs_04_0087__p54043401">ErrorMessage: Object restore is already in progress</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.10.2.2.4.1.3 "><p id="obs_04_0087__p15439333">409 Conflict</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0087__row4736276"><td class="cellrowborder" valign="top" width="25.509999999999998%" headers="mcps1.3.10.2.2.4.1.1 "><p id="obs_04_0087__p48094062">ObjectHasAlreadyRestored</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.059999999999995%" headers="mcps1.3.10.2.2.4.1.2 "><p id="obs_04_0087__p3304969">The objects have been restored and the retention period of the objects cannot be shortened.</p>
|
|
<p id="obs_04_0087__p29744726">ErrorMessage: After restoring an archived object, you cannot shorten the restoration period of the archived object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.10.2.2.4.1.3 "><p id="obs_04_0087__p60512629">409 Conflict</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0087__row7742752"><td class="cellrowborder" valign="top" width="25.509999999999998%" headers="mcps1.3.10.2.2.4.1.1 "><p id="obs_04_0087__p23183213">MalformedXML</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.059999999999995%" headers="mcps1.3.10.2.2.4.1.2 "><p id="obs_04_0087__p65900954">Invalid value for the <strong id="obs_04_0087__b619885412618">Days</strong> field (not an integer)</p>
|
|
<p id="obs_04_0087__p56237676">ErrorMessage: The XML you provided was not well-formed or did not validate against our published schema</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.10.2.2.4.1.3 "><p id="obs_04_0087__p58957901">400 Bad Request</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0087__row60859061"><td class="cellrowborder" valign="top" width="25.509999999999998%" headers="mcps1.3.10.2.2.4.1.1 "><p id="obs_04_0087__p30636915">InvalidArgument</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.059999999999995%" headers="mcps1.3.10.2.2.4.1.2 "><p id="obs_04_0087__p65671090">The value of the <strong id="obs_04_0087__b122901471874">Days</strong> field is not within the range of 1 to 30.</p>
|
|
<p id="obs_04_0087__p54168906">ErrorMessage: restoration days should be at least 1 and at most 30</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.10.2.2.4.1.3 "><p id="obs_04_0087__p25605228">400 Bad Request</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0087__row29120466"><td class="cellrowborder" valign="top" width="25.509999999999998%" headers="mcps1.3.10.2.2.4.1.1 "><p id="obs_04_0087__p9947522">MalformedXML</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.059999999999995%" headers="mcps1.3.10.2.2.4.1.2 "><p id="obs_04_0087__p442963">Invalid value for the <strong id="obs_04_0087__b861171713713">Tier</strong> field.</p>
|
|
<p id="obs_04_0087__p3986671">ErrorMessage: The XML you provided was not well-formed or did not validate against our published schema</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.10.2.2.4.1.3 "><p id="obs_04_0087__p54484948">400 Bad Request</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_04_0087__row20602486"><td class="cellrowborder" valign="top" width="25.509999999999998%" headers="mcps1.3.10.2.2.4.1.1 "><p id="obs_04_0087__p58188697">InvalidObjectState</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.059999999999995%" headers="mcps1.3.10.2.2.4.1.2 "><p id="obs_04_0087__p15663996">The restored object is not in the Cold storage.</p>
|
|
<p id="obs_04_0087__p6758237">ErrorMessage: Restore is not allowed, as object's storage class is not COLD</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.10.2.2.4.1.3 "><p id="obs_04_0087__p10546307">403 Forbidden</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0087__section22990347112"><h4 class="sectiontitle">Sample Request</h4><div class="codecoloring" codetype="Xml" id="obs_04_0087__screen1179230172715"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
|
|
<span class="normal"> 2</span>
|
|
<span class="normal"> 3</span>
|
|
<span class="normal"> 4</span>
|
|
<span class="normal"> 5</span>
|
|
<span class="normal"> 6</span>
|
|
<span class="normal"> 7</span>
|
|
<span class="normal"> 8</span>
|
|
<span class="normal"> 9</span>
|
|
<span class="normal">10</span>
|
|
<span class="normal">11</span>
|
|
<span class="normal">12</span>
|
|
<span class="normal">13</span></pre></div></td><td class="code"><div><pre><span></span>POST<span class="w"> </span>/object?restore<span class="w"> </span>HTTP/1.1
|
|
Host:<span class="w"> </span>examplebucket.obs.region.example.com
|
|
Accept:<span class="w"> </span>*/*
|
|
Date:<span class="w"> </span>WED,<span class="w"> </span>01<span class="w"> </span>Jul<span class="w"> </span>2015<span class="w"> </span>04:39:46<span class="w"> </span>GMT
|
|
Authorization:<span class="w"> </span>OBS<span class="w"> </span>H4IPJX0TQTHTHEBQQCEC:kaEwOixnSVuS6If3Q0Lnd6kxm5A=
|
|
Content-Length:<span class="w"> </span>183
|
|
|
|
<span class="nt"><RestoreRequest></span>
|
|
<span class="w"> </span><span class="nt"><Days></span>2<span class="nt"></Days></span><span class="w"> </span>
|
|
<span class="w"> </span><span class="nt"><RestoreJob></span>
|
|
<span class="w"> </span><span class="nt"><Tier></span>Expedited<span class="nt"></Tier></span>
|
|
<span class="w"> </span><span class="nt"></RestoreJob></span><span class="w"> </span>
|
|
<span class="nt"></RestoreRequest></span><span class="w"> </span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0087__section0244954115611"><h4 class="sectiontitle">Sample Response</h4><div class="codecoloring" codetype="Xml" id="obs_04_0087__screen14313135410562"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>202<span class="w"> </span>Accepted
|
|
Server:<span class="w"> </span>OBS
|
|
x-obs-request-id:<span class="w"> </span>A2F500000163F374CCBB2063F834C6C4
|
|
x-obs-id-2:<span class="w"> </span>32AAAUgAIAABAAAQAAEAABAAAQAAEAABCSLbWIs23RR95NVpkbWlJdlm8Dq+wQBw
|
|
Date:<span class="w"> </span>WED,<span class="w"> </span>01<span class="w"> </span>Jul<span class="w"> </span>2015<span class="w"> </span>04:39:46<span class="w"> </span>GMT
|
|
Content-Length:<span class="w"> </span>0
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_04_0079.html">Operations on Objects</a></div>
|
|
</div>
|
|
</div>
|
|
|