forked from docs/doc-exports
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: weihongmin1 <weihongmin1@huawei.com> Co-committed-by: weihongmin1 <weihongmin1@huawei.com>
157 lines
16 KiB
HTML
157 lines
16 KiB
HTML
<a name="obs_11_0016"></a><a name="obs_11_0016"></a>
|
|
|
|
<h1 class="topictitle1">Restoring Objects from the Cold Storage</h1>
|
|
<div id="body1542440101580"><div class="section" id="obs_11_0016__section1479112110815"><h4 class="sectiontitle">Function</h4><p id="obs_11_0016__p9144152174913">You can use this command to restore a specified <strong id="obs_11_0016__b6944185611239">cold</strong> object or restore <strong id="obs_11_0016__b7433510162410">cold</strong> objects with a specific prefix in batches.</p>
|
|
<div class="note" id="obs_11_0016__note3598947145714"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="obs_11_0016__ul963183695212"><li id="obs_11_0016__li9877143719529">Object content cannot be read during restoration.</li><li id="obs_11_0016__li186311736165217">After an object is restored, the time it requires before the object can be downloaded depends on the OBS server.</li></ul>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="obs_11_0016__section1220752192216"><h4 class="sectiontitle">Command Line Structure</h4><ul id="obs_11_0016__ul32951416429"><li id="obs_11_0016__li142951434215">In Windows<ul id="obs_11_0016__ul5962113824220"><li id="obs_11_0016__li8499215164214">Restoring an object<pre class="screen" id="obs_11_0016__screen16977161084320">obsutil restore obs://bucket/key [-d=1] [-t=xxx] [-versionId=xxx] [-fr] [-o=xxx] [-config=xxx] </pre>
|
|
</li><li id="obs_11_0016__li8697240164212">Restoring objects in batches<pre class="screen" id="obs_11_0016__screen11339921144314">obsutil restore obs://bucket[/key] -r [-f] [-v] [-d=1] [-t=xxx] [-o=xxx] [-j=1] [-config=xxx] </pre>
|
|
</li><li id="obs_11_0016__li92911844165118">Restoring all objects in a specific directory at a time<pre class="screen" id="obs_11_0016__screen129971754523">obsutil restore obs://bucket/folder/ -r [-f] [-v] [-d=1] [-t=xxx] [-o=xxx] [-j=1] [-config=xxx] </pre>
|
|
</li></ul>
|
|
</li><li id="obs_11_0016__li127625913427">In Linux or macOS<ul id="obs_11_0016__ul4131155724212"><li id="obs_11_0016__li194641957154213">Restoring an object<pre class="screen" id="obs_11_0016__screen3230328154320">./obsutil restore obs://bucket/key [-d=1] [-t=xxx] [-versionId=xxx] [-fr] [-o=xxx] [-config=xxx] </pre>
|
|
</li><li id="obs_11_0016__li20465957124217">Restoring objects in batches<pre class="screen" id="obs_11_0016__screen893173654318">./obsutil restore obs://bucket[/key] -r [-f] [-v] [-d=1] [-t=xxx] [-o=xxx] [-j=1] [-config=xxx] </pre>
|
|
</li></ul>
|
|
<ul id="obs_11_0016__ul206769221528"><li id="obs_11_0016__li1196143525216">Restoring all objects in a specific directory at a time<pre class="screen" id="obs_11_0016__screen1096163595219">./obsutil restore obs://bucket/folder/ -r [-f] [-v] [-d=1] [-t=xxx] [-o=xxx] [-j=1] [-config=xxx] </pre>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="obs_11_0016__section149663134016"><h4 class="sectiontitle">Examples</h4><ul id="obs_11_0016__ul1696103154019"><li id="obs_11_0016__li59611312407">Take the Windows OS as an example. Run the <strong id="obs_11_0016__b457411313143">obsutil restore obs://bucket-test/key</strong> command to restore a single object whose storage class is <strong id="obs_11_0016__b10181512122112">cold</strong>.<pre class="screen" id="obs_11_0016__screen10968318408"><strong id="obs_11_0016__b39603164016">obsutil restore obs://bucket-test/key</strong>
|
|
Start at 2024-09-30 08:56:17.9537365 +0000 UTC
|
|
|
|
Start to restore object [key] in the bucket [bucket-test] successfully, cost [252] ms, request id [0000019242250F754015F23EE0B7876E]</pre>
|
|
</li></ul>
|
|
<ul id="obs_11_0016__ul59617311406"><li id="obs_11_0016__li8961237402">Take the Windows OS as an example. Run the <strong id="obs_11_0016__b18473949377">obsutil restore obs://bucket-test -r -f</strong> command to restore objects whose storage class is <strong id="obs_11_0016__b19660057122113">cold</strong> in the bucket in batches.<pre class="screen" id="obs_11_0016__screen6966311401"><strong id="obs_11_0016__b59693124011">obsutil restore obs://bucket-test -r -f</strong>
|
|
Start at 2024-09-30 08:57:11.3565648 +0000 UTC
|
|
|
|
[================================================] 100.00% 3s
|
|
Succeed count: 12 Failed count: 0
|
|
Metrics [max cost:264 ms, min cost:54 ms, average cost:119.33 ms, average tps:19.70]
|
|
Task id: 96f104ee-d0bf-40ff-95dd-31dec0d8f4f4</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="obs_11_0016__section6559191102418"><h4 class="sectiontitle">Parameter Description</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_11_0016__table10831182114445" frame="border" border="1" rules="all"><thead align="left"><tr id="obs_11_0016__row683212154419"><th align="left" class="cellrowborder" valign="top" width="16.84%" id="mcps1.3.4.2.1.4.1.1"><p id="obs_11_0016__p118329219446">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.7%" id="mcps1.3.4.2.1.4.1.2"><p id="obs_11_0016__p15137125919108">Optional or Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="58.46%" id="mcps1.3.4.2.1.4.1.3"><p id="obs_11_0016__p12832121184414">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_11_0016__row108328217449"><td class="cellrowborder" valign="top" width="16.84%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0016__p64495172515">bucket</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.7%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0016__p154316502519">Mandatory</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.46%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0016__p17425512259">The bucket name</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0016__row14581162223916"><td class="cellrowborder" valign="top" width="16.84%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0016__p864719233464">key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.7%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0016__p8166018195614">Mandatory for restoring a single object whose storage class is <strong id="obs_11_0016__b229419472558">cold</strong></p>
|
|
<p id="obs_11_0016__p741812412475">Optional for batch restoring objects whose storage class is <strong id="obs_11_0016__b1943244175720">cold</strong></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.46%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0016__p1864718233461">The name of the object to be restored or the name prefix of the objects to be restored in batches</p>
|
|
<div class="note" id="obs_11_0016__note12611558164215"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0016__p1061114584426">If this parameter is left blank when batch restoring objects, all objects whose storage class is <strong id="obs_11_0016__b14694184835810">cold</strong> in the bucket are restored.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0016__row5136104314396"><td class="cellrowborder" valign="top" width="16.84%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0016__p152884115145">d</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.7%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0016__p12874171412">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.46%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0016__p63113823">The storage duration after objects whose storage class is <strong id="obs_11_0016__b33817465411">cold</strong> are restored, in days. The value ranges from 1 to 30. The default value is <strong id="obs_11_0016__b162176176572">1</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0016__row1979619354115"><td class="cellrowborder" valign="top" width="16.84%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0016__p187966384115">t</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.7%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0016__p97961933415">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.46%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0016__p579611319412">The options for restoring objects. Possible values are:</p>
|
|
<ul id="obs_11_0016__ul1273864144412"><li id="obs_11_0016__li17738649445">standard</li><li id="obs_11_0016__li1551213137447">expedited</li></ul>
|
|
<div class="note" id="obs_11_0016__note1980113505431"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="obs_11_0016__ul6317738122314"><li id="obs_11_0016__li19111451105011"><strong id="obs_11_0016__b36431959192913">expedited</strong> indicates that objects can be quickly restored from Archive storage within 1 to 5 minutes.</li><li id="obs_11_0016__li117461746195015"><strong id="obs_11_0016__b062812120306">standard</strong> indicates that objects can be restored from Archive storage within 3 to 5 hours.</li><li id="obs_11_0016__li668453914234">If this parameter is not configured, an expedited restore is used by default.</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0016__row1742147104113"><td class="cellrowborder" valign="top" width="16.84%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0016__p174267194117">versionId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.7%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0016__p774216710415">Optional for restoring a single object whose storage class is <strong id="obs_11_0016__b194658220715">cold</strong> (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.46%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0016__p874257164113">The version ID of the to-be-restored object whose storage class is <strong id="obs_11_0016__b742771211115">cold</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0016__row1671701015561"><td class="cellrowborder" valign="top" width="16.84%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0016__p8517143114816">fr</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.7%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0016__p1965455113483">Optional for restoring a single object whose storage class is <strong id="obs_11_0016__b519211231219">cold</strong> (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.46%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0016__p1951718433487">Generates an operation result file when restoring a single object whose storage class is <strong id="obs_11_0016__b10261182482819">cold</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0016__row18931643133919"><td class="cellrowborder" valign="top" width="16.84%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0016__p9369940145311">f</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.7%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0016__p19278143834816">Optional for batch restoring objects whose storage class is <strong id="obs_11_0016__b850354517132">cold</strong> (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.46%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0016__p972417362487">Runs in force mode.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0016__row11636444193916"><td class="cellrowborder" valign="top" width="16.84%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0016__p71594425537">r</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.7%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0016__p1273555018488">Mandatory for batch restoring objects whose storage class is <strong id="obs_11_0016__b3389249149">cold</strong> (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.46%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0016__p1173519509481">Restores objects whose storage class is <strong id="obs_11_0016__b3789244131412">cold</strong> in batches by object name prefix.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0016__row07312318419"><td class="cellrowborder" valign="top" width="16.84%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0016__p373223134117">v</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.7%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0016__p101701338485">Optional for batch restoring objects whose storage class is <strong id="obs_11_0016__b9428415141618">cold</strong> (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.46%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0016__p1073202316412">Restores versions of objects whose storage class is <strong id="obs_11_0016__b217192141719">cold</strong> in batches by object name prefix.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0016__row102561945153913"><td class="cellrowborder" valign="top" width="16.84%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0016__p138574472533">o</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.7%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0016__p817213354812">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.46%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0016__p4924117181112">The folder that stores the result files. After the command is executed, result files (possibly success and failure files) will be created in the specified folder. The default value is <strong id="obs_11_0016__b91711555101120">.obsutil_output</strong>, a subfolder in the user's home directory where obsutil commands are executed.</p>
|
|
<div class="note" id="obs_11_0016__note349481802414"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="obs_11_0016__ul101190347408"><li id="obs_11_0016__li111993418408">A result file should be named as follows: <strong id="obs_11_0016__b279801517336">restore_{succeed | failed}_report_</strong><em id="obs_11_0016__i079981513335">time</em><strong id="obs_11_0016__b1519517694716">_</strong><em id="obs_11_0016__i1112418774719">TaskId</em><strong id="obs_11_0016__b101951169471">.txt</strong>.<p id="obs_11_0016__li412103664016p0">By default, the maximum size of a single result file is 30 MB and the maximum number of result files that can be retained is 1,024. You can set the maximum size and number by configuring <strong id="obs_11_0016__b1727775743616">recordMaxLogSize</strong> and <strong id="obs_11_0016__b1827745711368">recordBackups</strong> in the configuration file.</p>
|
|
</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0016__row588544593912"><td class="cellrowborder" valign="top" width="16.84%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0016__p87050508534">j</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.7%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0016__p19177173320483">Optional for batch restoring objects whose storage class is <strong id="obs_11_0016__b488113297181">cold</strong> (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.46%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0016__p2549177181312">The maximum number of concurrent tasks for batch restoring objects whose storage class is <strong id="obs_11_0016__b10998114415196">cold</strong>. The default value is the value of <strong id="obs_11_0016__b1080653133415">defaultJobs</strong> in the configuration file.</p>
|
|
<div class="note" id="obs_11_0016__note891964620819"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0016__p1091964618820">The value is ensured to be greater than or equal to 1.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0016__row55581242153513"><td class="cellrowborder" valign="top" width="16.84%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0016__p153951131317">config</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.7%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0016__p12395135316">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.46%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0016__obs_11_0008_p1750111452317">The user-defined configuration file for executing the current command. For details about parameters that can be configured, see <a href="obs_11_0035.html">Configuration Parameters</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0016__row171491339123315"><td class="cellrowborder" valign="top" width="16.84%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0016__p1966666191820">payer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.7%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0016__p1266611611820">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.46%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0016__p1166617619181">Specifies that requester pays is enabled.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_11_0016__section6926520122416"><h4 class="sectiontitle">Response</h4><p id="obs_11_0016__p21251255183018">Refer to <a href="obs_11_0013.html#obs_11_0013__section6926520122416">Response</a> for uploading an object.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_11_0012.html">Object Commands</a></div>
|
|
</div>
|
|
</div>
|
|
|