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>
298 lines
39 KiB
HTML
298 lines
39 KiB
HTML
<a name="obs_11_0053"></a><a name="obs_11_0053"></a>
|
|
|
|
<h1 class="topictitle1">Moving an Object</h1>
|
|
<div id="body1554981456245"><div class="section" id="obs_11_0053__section2046320316257"><h4 class="sectiontitle">Function</h4><p id="obs_11_0053__p5937164102818">You can use this command to move a single object or move objects in batches by a specified object name prefix.</p>
|
|
<div class="notice" id="obs_11_0053__note780411406113"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="obs_11_0053__ul562142691216"><li id="obs_11_0053__li156218269126">Do not change the source objects in the OBS bucket when moving objects. Otherwise, the operation may fail or data may be inconsistent.</li><li id="obs_11_0053__li16529194022218">The source objects are deleted after the move operation succeeds.</li><li id="obs_11_0053__li2073805924513">If an object move (<strong id="obs_11_0053__b1877318543340">mv</strong>) task is manually canceled or interrupted unexpectedly, obsutil cannot automatically resume or continue the task. In such cases, the move task may fail to be completely executed (for example, the source object is copied but not deleted), which may cause the source and target objects to coexist.</li><li id="obs_11_0053__li164742023913">If the source bucket is a parallel file system (supporting POSIX), the destination bucket cannot be an object storage bucket.</li></ul>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="obs_11_0053__section23858124111"><a name="obs_11_0053__section23858124111"></a><a name="section23858124111"></a><h4 class="sectiontitle">Command Line Structure</h4><ul id="obs_11_0053__ul9634193211493"><li id="obs_11_0053__li1763473234917">In Windows<ul id="obs_11_0053__ul10693164464919"><li id="obs_11_0053__li9351943114915">Moving a single object<pre class="screen" id="obs_11_0053__screen17782164918497">obsutil mv obs://srcbucket/key obs://dstbucket/[dest] [-dryRun] [-u] [-p=1] [-threshold=52428800] [-versionId=xxx] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-cpd=xxx] [-fr] [-o=xxx] [-config=xxx] </pre>
|
|
</li><li id="obs_11_0053__li4878129135017">Moving objects in batches<pre class="screen" id="obs_11_0053__screen15740822175019">obsutil mv obs://srcbucket[/key] obs://dstbucket[/dest] -r [-dryRun] [-f] [-flat] [-u] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx] </pre>
|
|
</li></ul>
|
|
</li><li id="obs_11_0053__li245683714917">In Linux or macOS<ul id="obs_11_0053__ul20620193216509"><li id="obs_11_0053__li896314506">Moving a single object<pre class="screen" id="obs_11_0053__screen18891658135018">./obsutil mv obs://srcbucket/key obs://dstbucket/[dest] [-dryRun] [-u] [-p=1] [-threshold=52428800] [-versionId=xxx] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-cpd=xxx] [-fr] [-o=xxx] [-config=xxx] </pre>
|
|
</li><li id="obs_11_0053__li1964513913507">Moving objects in batches<pre class="screen" id="obs_11_0053__screen161391565118">./obsutil mv obs://srcbucket[/key] obs://dstbucket[/dest] -r [-dryRun] [-f] [-flat] [-u] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx] </pre>
|
|
</li></ul>
|
|
</li></ul>
|
|
<div class="note" id="obs_11_0053__note38181439115018"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="obs_11_0053__ul18347716517"><li id="obs_11_0053__li1583410755112">The source path and destination path cannot be the same.</li><li id="obs_11_0053__li283411717519">The source and destination paths cannot be nested when moving objects in batches.</li><li id="obs_11_0053__li202932177144">Batch object move is not available for parallel file systems.</li></ul>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="obs_11_0053__section185216375373"><h4 class="sectiontitle">Examples</h4><ul id="obs_11_0053__ul252283733718"><li id="obs_11_0053__li65228376375">Take the Windows OS as an example. Run the <strong id="obs_11_0053__b12977813142111">obsutil mv obs://bucket-test/key obs://bucket-test2</strong> command to move a single object.<pre class="screen" id="obs_11_0053__screen8522133753719"><strong id="obs_11_0053__b1852293713718">obsutil mv obs://bucket-test/key obs://bucket-test2</strong>
|
|
Start at 2024-09-30 08:36:01.3934921 +0000 UTC
|
|
|
|
Parallel: 5 Jobs: 5
|
|
Threshold: 50.00MB PartSize: auto
|
|
CheckpointDir: xxxx
|
|
|
|
[=====================================================] 100.00% 6/s 0s
|
|
Waiting for the copied key to be completed on server side.
|
|
|
|
Move successfully, 19B, obs://bucket-test/key --> obs://bucket-test2/key, cost [1815], status [200], request id [00000192421282AC401423183A8B83A1]</pre>
|
|
</li></ul>
|
|
<ul id="obs_11_0053__ul25221037133720"><li id="obs_11_0053__li352233763714">Take the Windows OS as an example. Run the <strong id="obs_11_0053__b149781813172117">obsutil mv obs://bucket-test/temp/ obs://bucket-test2 -f -r</strong> command to move objects in batches.<pre class="screen" id="obs_11_0053__screen11523437183713"><strong id="obs_11_0053__b752320376379">obsutil mv obs://bucket-test/temp/ obs://bucket-test2 -f -r</strong>
|
|
Start at 2024-09-30 08:37:32.2454905 +0000 UTC
|
|
|
|
Parallel: 5 Jobs: 5
|
|
Threshold: 50.00MB PartSize: auto
|
|
CheckpointDir: xxxx
|
|
Task id: 0476929d-9d23-4dc5-b2f8-0a0493f027c5
|
|
OutputDir: xxxx
|
|
|
|
[=============================================================] 100.00% 10/s 0s
|
|
Succeed count: 5 Failed count: 0
|
|
Metrics [max cost:298 ms, min cost:192 ms, average cost:238.00 ms, average tps:9.71, transferred size: 7.20MB]
|
|
Task id: 0476929d-9d23-4dc5-b2f8-0a0493f027c5</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="obs_11_0053__section33057574522"><h4 class="sectiontitle">Parameter Description</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_11_0053__table125609307312" frame="border" border="1" rules="all"><thead align="left"><tr id="obs_11_0053__row456603043117"><th align="left" class="cellrowborder" valign="top" width="17.57%" id="mcps1.3.4.2.1.4.1.1"><p id="obs_11_0053__p85680303316">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.529999999999998%" id="mcps1.3.4.2.1.4.1.2"><p id="obs_11_0053__p14572130153112">Optional or Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="63.9%" id="mcps1.3.4.2.1.4.1.3"><p id="obs_11_0053__p15751930133118">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_11_0053__row20577630203112"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p18579630143115">srcbucket</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p458314302313">Mandatory</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p34544306544">The source bucket name</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row1059316307314"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p159616306318">dstbucket</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p1559933073119">Mandatory</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p95994308315">The destination bucket name</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row169347719447"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p1811911004419">dest</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p9123510204415">Optional</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p1839313263477">The destination object name when moving a single object, or the name prefix of destination objects when moving objects in batches</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row106007303311"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p1060363010318">key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p8535551165513">Mandatory for moving a single object</p>
|
|
<p id="obs_11_0053__p7265911561">Optional for moving objects in batches</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p176052030183114">The source object name when moving a single object, or the name prefix of source objects when moving objects in batches</p>
|
|
<p id="obs_11_0053__p36061309319">The rules are as follows:</p>
|
|
<ul id="obs_11_0053__ul1560743053116"><li id="obs_11_0053__li8305125017131">This parameter cannot be left blank when moving a single object. If <strong id="obs_11_0053__b17382225533">dest</strong> is left blank, the source object is moved to the root directory of the destination bucket. If the value of <strong id="obs_11_0053__b838316257318">dest</strong> ends with a slash (/), the destination object name is the value of <strong id="obs_11_0053__b238462516311">dest</strong> plus the source object name. Otherwise, the destination object name is the value of <strong id="obs_11_0053__b14384325336">dest</strong>.</li><li id="obs_11_0053__li18729884611">If this parameter is left blank when moving objects in batches, all objects in the source bucket are moved. If not, objects whose name prefix is the set value in the source bucket are moved. The rules for confirming the name of the destination object are as follows:<ul id="obs_11_0053__ul101911711114619"><li id="obs_11_0053__li854312210453">If the value of <strong id="obs_11_0053__b175610418258">dest</strong> ends with a slash (/), the destination object name is the value of <strong id="obs_11_0053__b1756312281499">dest</strong> plus the source object name.</li><li id="obs_11_0053__li10217143020463">If the value of <strong id="obs_11_0053__b198673121165">dest</strong> does not end with a slash (/), the destination object name is <em id="obs_11_0053__i1144918511760">the value of </em><em id="obs_11_0053__i651522503618"><strong id="obs_11_0053__b92851281163">dest</strong></em><strong id="obs_11_0053__b10281031178">/</strong><em id="obs_11_0053__i563313811717">source object name</em>.</li></ul>
|
|
</li></ul>
|
|
<div class="note" id="obs_11_0053__note14528254193716"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="obs_11_0053__ul17203733184419"><li id="obs_11_0053__li12203113313442">If this parameter is configured but parameter <strong id="obs_11_0053__b882713482518">flat</strong> is not when moving objects in batches, the name of the source object contains the name prefix of the parent object. If <strong id="obs_11_0053__b168287489512">flat</strong> is configured, then the name of the source object does not contain the name prefix of the parent object.</li><li id="obs_11_0053__li182039334441">For details about how to use this parameter, see <a href="#obs_11_0053__section23858124111">Command Line Structure</a>.</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row64161323113"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p123051451513">fr</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p113071451811">Optional for moving an object (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p73101351816">Generates an operation result file when moving an object.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row19803114816115"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p13236151151117">flat</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p142391351111116">Optional for moving objects in batches (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p624025171110">The name prefix of the parent object is excluded when moving objects in batches.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row1513173918563"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p1537517155414">dryRun</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p13376216548">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p1137981175411">Conducts a dry run.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row17612113018317"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p1461418302318">u</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p1615183013110">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p12647141718263">Indicates incremental move. If this parameter is set, each object can be moved only when it does not exist in the destination bucket, its size is different from the namesake one in the destination bucket, or it has the latest modification time.</p>
|
|
<div class="note" id="obs_11_0053__note21654238262"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0053__p756433614817">If the size and modification time of the destination object are the same as those of the source object, the source object is directly deleted instead of being moved.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row3632193093117"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p26341030163117">p</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p9636183093120">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p7638163013112">The maximum number of concurrent multipart move tasks when moving an object. The default value is the value of <strong id="obs_11_0053__b495133214444">defaultParallels</strong> in the configuration file.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row363913014313"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p116401030183113">threshold</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p176431304319">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p16441830113114">The threshold for enabling multipart move, in bytes. The default value is the value of <strong id="obs_11_0053__b289264273012">defaultBigfileThreshold</strong> in the configuration file.</p>
|
|
<div class="note" id="obs_11_0053__note1382352674913"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="obs_11_0053__ul182059695115"><li id="obs_11_0053__li1320515655118">If the size of the object to be moved is smaller than the threshold, move the object directly. If not, a multipart move is required.</li><li id="obs_11_0053__li1651511123516">If you move an object directly, no part record is generated, and resumable transmission is not supported.</li><li id="obs_11_0053__li1184794414422">This parameter value can contain a unit, for example, <strong id="obs_11_0053__b19250132610516">1MB</strong> (indicating 1,048,576 bytes).</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row145994924514"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p95911457154514">versionId</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p0594135774510">Optional for moving an object (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p1859655744514">The source object version ID that can be specified when moving a single object</p>
|
|
<div class="note" id="obs_11_0053__note1285242652713"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0053__p38424716375">Parameter <strong id="obs_11_0053__b1499118419342">versionId</strong> cannot be configured for buckets that support POSIX.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row264453012315"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p964614304315">acl</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p17648193011318">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p16650163083117">The access control policies for destination objects that can be specified when moving objects. Possible values are:</p>
|
|
<ul id="obs_11_0053__ul0651183053115"><li id="obs_11_0053__li13652230153113">private</li><li id="obs_11_0053__li1965516308318">public-read</li><li id="obs_11_0053__li1265633023119">public-read-write</li><li id="obs_11_0053__li193894267536">bucket-owner-full-control</li></ul>
|
|
<div class="note" id="obs_11_0053__note1790113183525"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0053__p92982882916">The preceding four values indicate private read and write, public read, public read and write, and bucket owner full control.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row62441623105116"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p13466172515511">sc</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p134681525175117">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p04731025135114">The storage classes of the destination objects that can be specified when moving objects. Possible values are:</p>
|
|
<ul id="obs_11_0053__ul175651814214"><li id="obs_11_0053__li1256512172114"><strong id="obs_11_0053__b2884043121012">standard</strong>: Standard storage class. It features low access latency and high throughput, and is applicable to storing frequently accessed data (multiple accesses per month) or data that is smaller than 1 MB.</li><li id="obs_11_0053__li10565181142113"><strong id="obs_11_0053__b1134343533220">warm</strong>: Warm storage class. It is ideal for storing infrequently accessed (less than 12 times a year) data, but when needed, the access has to be fast.</li><li id="obs_11_0053__li756616110216"><strong id="obs_11_0053__b1711919389325">cold</strong>: Cold storage class. It provides secure, durable, and inexpensive storage for rarely-accessed (once a year) data.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row8659203023112"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p1366223093111">meta</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p26631230193118">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p17941525135111">The metadata of destination objects that can be specified when moving objects. The format is <em id="obs_11_0053__i183948142313">key1</em><strong id="obs_11_0053__b839719147310">:</strong><em id="obs_11_0053__i143970148316">value1</em><strong id="obs_11_0053__b639819141631">#</strong><em id="obs_11_0053__i2039812142317">key2</em><strong id="obs_11_0053__b63995141316">:</strong><em id="obs_11_0053__i173991141735">value2</em><strong id="obs_11_0053__b940011141031">#</strong><em id="obs_11_0053__i34011314436">key3</em><strong id="obs_11_0053__b1340119143316">:</strong><em id="obs_11_0053__i1940212141535">value3</em>.</p>
|
|
<div class="note" id="obs_11_0053__note1606229165119"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0053__p686342013559">The preceding value indicates that the destination objects in the bucket contain three groups of customized metadata after objects are moved: <strong id="obs_11_0053__b17135731716">key1:value1</strong>, <strong id="obs_11_0053__b613177161713">key2:value2</strong>, and <strong id="obs_11_0053__b013167111711">key3:value3</strong>.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row466716303317"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p1366917307314">ps</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p267203023115">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p1167313023117">The size of each part in a multipart move task, in bytes. The value ranges from <strong id="obs_11_0053__b16386431553">100KB</strong> to <strong id="obs_11_0053__b11529144111551">5GB</strong>. The default value is the value of <strong id="obs_11_0053__b1782672311313">defaultPartSize</strong> in the configuration file.</p>
|
|
<div class="note" id="obs_11_0053__note12706112664318"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="obs_11_0053__ul67581919204219"><li id="obs_11_0053__li167581819184220">This parameter value can contain a unit, for example, <strong id="obs_11_0053__b22521722115118">1MB</strong> (indicating 1,048,576 bytes).</li><li id="obs_11_0053__li144561220153810">The parameter can be set to <strong id="obs_11_0053__b8938151934315">auto</strong>. In this case, obsutil automatically sets the part size for each multipart task based on the source object size.</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row1367463093119"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p1967612305318">cpd</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p1367810308316">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p46792307316">The folder where the part records reside. The default value is <strong id="obs_11_0053__b13201154217257">.obsutil_checkpoint</strong>, the subfolder in the home directory of the user who executes obsutil commands.</p>
|
|
<div class="note" id="obs_11_0053__note22601842192718"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0053__p118866577266">A part record is generated during a multipart move and saved to the <strong id="obs_11_0053__b2079243114173">copy</strong> subfolder. After the move succeeds, its part record is deleted automatically. If the move fails or is suspended, the system attempts to resume the task according to its part record when you perform the move the next time.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row12681173043113"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p1683230123111">r</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p1368433083110">Mandatory for moving objects in batches (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p12686930183119">Moves objects in batches based on a specified name prefix of objects in the source bucket.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row1568763019310"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p2688183018315">f</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p1691193012317">Optional for moving objects in batches (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p1269315302318">Runs in force mode.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row20694163013111"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p269613053110">j</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p170013055218">Optional for moving objects in batches (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p4699130153112">The maximum number of concurrent tasks for moving objects in batches. The default value is the value of <strong id="obs_11_0053__b6802155075017">defaultJobs</strong> in the configuration file.</p>
|
|
<div class="note" id="obs_11_0053__note891964620819"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0053__p1091964618820">The value is ensured to be greater than or equal to 1.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row8334161131517"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p7660121421518">exclude</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p176621714131512">Optional for moving objects in batches (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p16666614131519">The matching patterns of source objects that are excluded, for example: <strong id="obs_11_0053__b98036164282">*.txt</strong></p>
|
|
<div class="note" id="obs_11_0053__note145284716208"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="obs_11_0053__ul05604713204"><li id="obs_11_0053__li14580477208">The asterisk (*) represents any group of characters, and the question mark (?) represents any single character. For instance, <strong id="obs_11_0053__b220217189286">abc*.txt</strong> indicates any file whose name starts with <strong id="obs_11_0053__b192030188286">abc</strong> and ends with <strong id="obs_11_0053__b19205318162818">.txt</strong>.</li><li id="obs_11_0053__li485725816339">You can use <strong id="obs_11_0053__b95182011288">\*</strong> to represent <strong id="obs_11_0053__b86520152817">*</strong> and <strong id="obs_11_0053__b147122092814">\?</strong> to represent <strong id="obs_11_0053__b168122032817">?</strong>.</li><li id="obs_11_0053__li20603473203">If the name of the object to be moved matches the value of this parameter, the object is skipped.</li></ul>
|
|
</div></div>
|
|
<div class="notice" id="obs_11_0053__note179117549207"><span class="noticetitle"> NOTICE: </span><div class="noticebody"><ul id="obs_11_0053__ul877892116516"><li id="obs_11_0053__li1517310321518">You are advised to use quotation marks for the matching pattern to prevent special characters from being escaped by the OS and leading to unexpected results. Use single quotation marks for Linux or macOS and double quotation marks for Windows.</li><li id="obs_11_0053__li022165913813">The matching pattern applies to the absolute path of an object, including the object name prefix and object name starting from the root directory. For example, if the path of an object in the bucket is <strong id="obs_11_0053__b17743109155712">obs://bucket/src1/src2/test.txt</strong>, then the absolute path of the object is <strong id="obs_11_0053__b0744995574">src1/src2/test.txt</strong>.</li><li id="obs_11_0053__li1148165015513">This matching pattern applies only to objects whose names do not end with a slash (/).</li><li id="obs_11_0053__li772248194117">Multiple <strong id="obs_11_0053__b1379172005220">exclude</strong> parameters can be specified, for example, <strong id="obs_11_0053__b17951342514">-exclude=*.xxx -exclude=*.xxx</strong>.</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row207003306314"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p11703123012317">include</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p470523013527">Optional for moving objects in batches (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p37071730153119">The matching patterns of source objects that are included, for example: <strong id="obs_11_0053__b17984162514281">*.jpg</strong></p>
|
|
<div class="note" id="obs_11_0053__note195168716220"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="obs_11_0053__ul752013715229"><li id="obs_11_0053__li135211772221">The asterisk (*) represents any group of characters, and the question mark (?) represents any single character.</li><li id="obs_11_0053__li095322123418">You can use <strong id="obs_11_0053__b144924521579">\*</strong> to represent <strong id="obs_11_0053__b1349314526578">*</strong> and <strong id="obs_11_0053__b649414527570">\?</strong> to represent <strong id="obs_11_0053__b184951752155711">?</strong>.</li><li id="obs_11_0053__li16523871227">Only after identifying that the name of the file to be moved does not match the value of <strong id="obs_11_0053__b186317308287">exclude</strong>, the system checks whether the file name matches the value of this parameter. If yes, the file is moved. If not, the file is skipped.</li></ul>
|
|
</div></div>
|
|
<div class="notice" id="obs_11_0053__note9270217202212"><span class="noticetitle"> NOTICE: </span><div class="noticebody"><ul id="obs_11_0053__ul11495105419578"><li id="obs_11_0053__li449635411576">You are advised to use quotation marks for the matching pattern to prevent special characters from being escaped by the OS and leading to unexpected results. Use single quotation marks for Linux or macOS and double quotation marks for Windows.</li><li id="obs_11_0053__li31631544919">The matching pattern applies to the absolute path of an object, including the object name prefix and object name starting from the root directory. For example, if the path of an object in the bucket is <strong id="obs_11_0053__b19761653185911">obs://bucket/src1/src2/test.txt</strong>, then the absolute path of the object is <strong id="obs_11_0053__b1697635319597">src1/src2/test.txt</strong>.</li><li id="obs_11_0053__li156078420919">This matching pattern applies only to objects whose names do not end with a slash (/).</li><li id="obs_11_0053__li195101514412">Multiple <strong id="obs_11_0053__b943563218526">include</strong> parameters can be specified, for example, <strong id="obs_11_0053__b19285101511518">-include=*.xxx -include=*.xxx</strong>.</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row881016184213"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p496314014481">timeRange</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p1664510223494">Optional for moving objects in batches (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p16963940134813">The time range matching pattern when moving objects. Only objects whose latest modification time is within the configured time range are moved.</p>
|
|
<p id="obs_11_0053__p1565821819529">This pattern has a lower priority than the object matching patterns (<strong id="obs_11_0053__b798717286019">exclude</strong>/<strong id="obs_11_0053__b898918288012">include</strong>). That is, the time range matching pattern is executed after the configured object matching patterns.</p>
|
|
<div class="note" id="obs_11_0053__note8766915165919"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="obs_11_0053__ul19272430145915"><li id="obs_11_0053__li12731730115918">The matching time range is represented in <em id="obs_11_0053__i166591939609">time1</em><strong id="obs_11_0053__b146611839208">-</strong><em id="obs_11_0053__i196626391809">time2</em>, where <em id="obs_11_0053__i2663739401">time1</em> must be earlier than or the same as <em id="obs_11_0053__i866513913015">time2</em>. The time format is <em id="obs_11_0053__i3666639806">yyyyMMddHHmmss</em>.</li><li id="obs_11_0053__li32731530185916">Automatic formatting is supported. For example, yyyyMMdd is equivalent to yyyyMMdd000000, and yyyyMM is equivalent to yyyyMM01000000.</li><li id="obs_11_0053__li5185481610">If this parameter is set to <strong id="obs_11_0053__b139130461105">*-</strong><em id="obs_11_0053__i18914846808">time2</em>, all files whose latest modification time is earlier than <em id="obs_11_0053__i491514461408">time2</em> are matched. If it is set to <em id="obs_11_0053__i189172463010">time1</em><strong id="obs_11_0053__b291810461016">-*</strong>, all files whose latest modification time is later than <em id="obs_11_0053__i17919104617014">time1</em> are matched.</li></ul>
|
|
</div></div>
|
|
<div class="notice" id="obs_11_0053__note1078981817591"><span class="noticetitle"> NOTICE: </span><div class="noticebody"><ul id="obs_11_0053__ul881073612597"><li id="obs_11_0053__li1740024105917">Time in the matching pattern is the UTC time.</li><li id="obs_11_0053__li58105368598">This matching pattern applies only to objects whose names do not end with a slash (/).</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row17951173311713"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p10122175516">mf</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p1562018121550">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p31226718512">Indicates that the name matching pattern (<strong id="obs_11_0053__b1218316342316">include</strong> or <strong id="obs_11_0053__b5196634936">exclude</strong>) and the time matching pattern (<strong id="obs_11_0053__b201971134335">timeRange</strong>) also take effect on objects whose names end with a slash (/).</p>
|
|
<p id="obs_11_0053__p15797105118514"></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row9725193023119"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p1672753013119">o</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p871493095216">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p137321030143112">The folder that stores the result files. After the command is executed, result files (possibly success, failure, and warning files) will be created in the specified folder. The default value is <strong id="obs_11_0053__b68914575255">.obsutil_output</strong>, a subfolder in the user's home directory where obsutil commands are executed.</p>
|
|
<div class="note" id="obs_11_0053__note289083220249"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="obs_11_0053__ul101190347408"><li id="obs_11_0053__li111993418408">A result file should be named as follows: <strong id="obs_11_0053__b184012103119">mv_{succeed | failed | warning}_report_</strong><em id="obs_11_0053__i1040215107118">time</em><strong id="obs_11_0053__b11404131011118">_TaskId.txt</strong>.</li><li id="obs_11_0053__li38231412113320">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_0053__b8246121873610">recordMaxLogSize</strong> and <strong id="obs_11_0053__b102471818103610">recordBackups</strong> in the configuration file.</li><li id="obs_11_0053__li123641019211">If there are multiple folders and files and you need to confirm the details of a failed task, refer to the failure result file <strong id="obs_11_0053__obs_11_0013_b5396121718320">cp_failed_report_</strong><em id="obs_11_0053__obs_11_0013_i1639621714325">time</em><strong id="obs_11_0053__obs_11_0013_b1739631753215">_</strong><em id="obs_11_0053__obs_11_0013_i203979172328">TaskId</em><strong id="obs_11_0053__obs_11_0013_b1639718176326">.txt</strong> in the result folder and the <a href="obs_11_0056.html">log files</a> in the log path.</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row1762914182"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p114391014518">bucket-cname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p4143210950">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p16143610251">The user-defined domain name bound to the bucket</p>
|
|
<div class="note" id="obs_11_0053__note16256574591"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0053__p172595719595">This parameter is only supported by obsutil 5.7.9 and later.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0053__row1112831783618"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p153951131317">config</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p12395135316">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__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_0053__row107107466326"><td class="cellrowborder" valign="top" width="17.57%" headers="mcps1.3.4.2.1.4.1.1 "><p id="obs_11_0053__p1966666191820">payer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.529999999999998%" headers="mcps1.3.4.2.1.4.1.2 "><p id="obs_11_0053__p1266611611820">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="63.9%" headers="mcps1.3.4.2.1.4.1.3 "><p id="obs_11_0053__p1166617619181">Specifies that requester pays is enabled.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_11_0053__section1525012533192"><h4 class="sectiontitle">Response</h4><p id="obs_11_0053__p1624855312191">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>
|
|
|