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>
295 lines
37 KiB
HTML
295 lines
37 KiB
HTML
<a name="obs_11_0042"></a><a name="obs_11_0042"></a>
|
|
|
|
<h1 class="topictitle1">Synchronously Uploading Incremental Objects</h1>
|
|
<div id="body1547713383688"><div class="section" id="obs_11_0042__section68797549353"><h4 class="sectiontitle">Function</h4><p id="obs_11_0042__p54301560815">You can use this command to synchronize all content in a local source path to the specified target OBS bucket to ensure data consistency. Incremental synchronization has the following meanings:</p>
|
|
<ol id="obs_11_0042__ol7389514788"><li id="obs_11_0042__li1138910141086">"Incremental" means that the local source files are compared with their counterparts in the target bucket and only those with content changes are uploaded.</li><li id="obs_11_0042__li89648205815">"Synchronization" means that after the command is executed, all source files in the local path have their counterparts in the target OBS bucket.</li></ol>
|
|
</div>
|
|
<div class="notice" id="obs_11_0042__note15184181913594"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><ul id="obs_11_0042__ul1680042375018"><li id="obs_11_0042__li68001023115010">Do not change the local file or folder during synchronization. Otherwise, the synchronization may fail or data may be inconsistent.</li><li id="obs_11_0042__li18348152815501">Each file can be synchronously uploaded only when it does not exist in the bucket, its size is different from the namesake one in the bucket, or it has the latest modification time.</li></ul>
|
|
</div></div>
|
|
<div class="section" id="obs_11_0042__section1220752192216"><h4 class="sectiontitle">Command Line Structure</h4><ul id="obs_11_0042__ul2098662312412"><li id="obs_11_0042__li198632362414">In Windows<ul id="obs_11_0042__ul48751720253"><li id="obs_11_0042__li1012518598242">Uploading a file synchronously<pre class="screen" id="obs_11_0042__screen10125859132415">obsutil sync file_url obs://bucket[/key] [-arcDir=xxx] [-dryRun] [-link] [-vlength] [-vmd5] [-p=1] [-threshold=5248800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-o=xxx] [-cpd=xxx] [-fr] [-config=xxx] </pre>
|
|
</li><li id="obs_11_0042__li162401213162513">Uploading a folder synchronously<pre class="screen" id="obs_11_0042__screen13477182952517">obsutil sync folder_url obs://bucket[/key] [-arcDir=xxx] [-dryRun] [-link] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-at] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx] </pre>
|
|
</li></ul>
|
|
</li><li id="obs_11_0042__li7461142911245">In Linux or macOS<ul id="obs_11_0042__ul19781832122716"><li id="obs_11_0042__li13282130132713">Uploading a file synchronously<pre class="screen" id="obs_11_0042__screen146603552810">./obsutil sync file_url obs://bucket[/key] [-arcDir=xxx] [-dryRun] [-link] [-vlength] [-vmd5] [-p=1] [-threshold=5248800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-o=xxx] [-cpd=xxx] [-fr] [-config=xxx] </pre>
|
|
</li><li id="obs_11_0042__li186411137132711">Uploading a folder synchronously<pre class="screen" id="obs_11_0042__screen13485493273">./obsutil sync folder_url obs://bucket[/key] [-arcDir=xxx] [-dryRun] [-link] [-vlength] [-vmd5] [-j=1] [-p=1] [-threshold=52428800] [-acl=xxx] [-sc=xxx] [-meta=aaa:bbb#ccc:ddd] [-ps=auto] [-include=*.xxx] [-exclude=*.xxx] [-timeRange=time1-time2] [-at] [-mf] [-o=xxx] [-cpd=xxx] [-config=xxx] </pre>
|
|
</li></ul>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="obs_11_0042__section53881308394"><h4 class="sectiontitle">Examples</h4><ul id="obs_11_0042__ul23882012398"><li id="obs_11_0042__li12388120153912">Take the Windows OS as an example. Run the <strong id="obs_11_0042__b457411313143">obsutil sync d:\temp\test.txt obs://bucket-test/key</strong> command to synchronously upload a file.<pre class="screen" id="obs_11_0042__screen1938810013397"><strong id="obs_11_0042__b53887013397">obsutil sync d:\temp\test.txt obs://bucket-test/key</strong>
|
|
|
|
Start at 2024-09-25 04:48:10.1147483 +0000 UTC
|
|
|
|
Parallel: 5 Jobs: 5
|
|
Threshold: 50.00MB PartSize: auto
|
|
VerifyLength: false VerifyMd5: false
|
|
CheckpointDir: C:\Users\Administrator\.obsutil_checkpoint
|
|
|
|
[====================================================] 100.00% 1.68 MB/s 8.46MB/8.46MB 5s
|
|
Upload successfully, 8.46MB, d:\temp\test.txt --> obs://bucket-test/key, cost [55], status [200], request id [00000192421F4E224012B8470C0CCCDC]</pre>
|
|
</li></ul>
|
|
<ul id="obs_11_0042__ul13897016394"><li id="obs_11_0042__li16389806391">Take the Windows OS as an example. Run the <strong id="obs_11_0042__b153291461773">obsutil sync d:\temp obs://bucket-test/temp</strong> command to synchronously upload a folder.<pre class="screen" id="obs_11_0042__screen7390110143917"><strong id="obs_11_0042__b239018013391">obsutil sync d:\temp obs://bucket-test/temp</strong>
|
|
|
|
Start at 2024-09-25 04:48:10.1147483 +0000 UTC
|
|
|
|
Parallel: 5 Jobs: 5
|
|
Threshold: 50.00MB PartSize: auto
|
|
VerifyLength: false VerifyMd5: false
|
|
CheckpointDir: C:\Users\Administrator\.obsutil_checkpoint
|
|
Task id: 104786c8-27c2-48fc-bc6a-5886596fb0ed
|
|
|
|
OutputDir: C:\Users\Administrator\.obsutil_output
|
|
|
|
[========================================================] 100.00% tps:35.71 2.02 KB/s 7.20MB/7.20MB 0s
|
|
Succeed count: 5 Failed count: 0
|
|
Succeed bytes: xxxx
|
|
Metrics [max cost:90 ms, min cost:45 ms, average cost:63.80 ms, average tps:35.71, transferred size: 7.20MB]
|
|
Task id: 104786c8-27c2-48fc-bc6a-5886596fb0ed</pre>
|
|
</li></ul>
|
|
<ul id="obs_11_0042__ul16390110143911"><li id="obs_11_0042__li193901403395">For more examples, see <a href="obs_11_0027.html">Common Examples</a>.</li></ul>
|
|
</div>
|
|
<div class="section" id="obs_11_0042__section6559191102418"><h4 class="sectiontitle">Parameter Description</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_11_0042__table10831182114445" frame="border" border="1" rules="all"><thead align="left"><tr id="obs_11_0042__row683212154419"><th align="left" class="cellrowborder" valign="top" width="15.61%" id="mcps1.3.5.2.1.4.1.1"><p id="obs_11_0042__p118329219446">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.35%" id="mcps1.3.5.2.1.4.1.2"><p id="obs_11_0042__p15137125919108">Optional or Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="65.03999999999999%" id="mcps1.3.5.2.1.4.1.3"><p id="obs_11_0042__p12832121184414">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_11_0042__row108328217449"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p64495172515">file_url</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p154316502519">Mandatory for uploading a file synchronously</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p17425512259">The local file path</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row994520519116"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p1294565714">folder_url</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p2945850113">Mandatory for uploading a folder synchronously</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p7945859110">The local folder path</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row1538192203220"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p154092113211">bucket</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p105401120328">Mandatory</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p1954062113212">The bucket name</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row823371133212"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p13233171113215">key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p152331511173216">Optional</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p16965474526">The object name or object name prefix specified when uploading a file synchronously, or the object name prefix specified when uploading a folder synchronously</p>
|
|
<p id="obs_11_0042__p060018221533">The rules are as follows:</p>
|
|
<ul id="obs_11_0042__ul7190122515538"><li id="obs_11_0042__li15190225135311">If this parameter is left blank when synchronously uploading a file, the file is uploaded to the root directory of the bucket and the object name is the file name. If the value ends with a slash (/), the value is used as the object name prefix when the file is uploaded, and the object name is the value plus the file name. If the value does not end with a slash (/), the file is uploaded with the value as the object name.</li><li id="obs_11_0042__li161384914910">If this parameter is left blank when synchronously uploading a folder, all objects in the root directory of the bucket are the same as the files in the local folder. If this parameter is configured, objects whose name prefix is the configured value are the same as the files in the local folder.</li></ul>
|
|
<div class="note" id="obs_11_0042__note14528254193716"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="obs_11_0042__ul1791612918129"><li id="obs_11_0042__li56341131161211">If the value of this parameter does not end with a slash (/) when synchronously uploading a folder, the obsutil tool automatically adds a slash (/) at the end of the configured value as the object name prefix.</li><li id="obs_11_0042__li1891611294125">For details about how to use this parameter, see <a href="obs_11_0046.html">Synchronous Upload</a>.</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row81423312116"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p123051451513">fr</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p113071451811">Optional for synchronously uploading a file (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p73101351816">Generates an operation result file when synchronously uploading a file.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row41295913415"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p7755144410481">arcDir</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p13755134434810">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p1175594410487">The path to which the synchronously uploaded files are archived</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row20808111443516"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p1537517155414">dryRun</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p13376216548">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p1137981175411">Conducts a dry run.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row890711361755"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p990817361553">link</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p9321174511519">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p890843615516">The actual path of a symbolic link for a file or folder</p>
|
|
<div class="notice" id="obs_11_0042__note57871443132412"><span class="noticetitle"> NOTICE: </span><div class="noticebody"><ul id="obs_11_0042__ul19871513171214"><li id="obs_11_0042__li887118138129">If this parameter is not specified and the file to be uploaded is a symbolic-link file whose target file does not exist, the exception message "The system cannot find the file specified" will be displayed in Windows OS, while the exception message "No such file or directory" will be displayed in macOS or Linux OS.</li><li id="obs_11_0042__li17824151516128">Avoid the symbolic link loop of a folder, otherwise, the upload will exit due to panic. If you do not want the system to panic, set <strong id="obs_11_0042__b11111014518">panicForSymbolicLinkCircle</strong> to <strong id="obs_11_0042__b11211015451">false</strong> in the configuration file.</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row14823182511325"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p10823125153219">vlength</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p12641397348">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p582315257326">After the synchronous upload is complete, checks whether the sizes of the objects in the bucket are the same as those of the local files.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row77547237323"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p16754102323216">vmd5</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p9286153913341">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p10755202313327">After the synchronous upload is complete, checks whether the MD5 values of the objects in the bucket are the same as those of the local files.</p>
|
|
<div class="note" id="obs_11_0042__note9812411501"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="obs_11_0042__ul11953144002612"><li id="obs_11_0042__li10954184017262">If the size of the file or folder to be uploaded is too large, using this parameter will degrade the overall performance due to MD5 calculation.</li><li id="obs_11_0042__li1995484062615">After the MD5 verification is successful, this parameter value is used for metadata <strong id="obs_11_0042__b8366164815255">x-obs-meta-md5chksum</strong>, for later MD5 verification during download or copy.</li></ul>
|
|
</div></div>
|
|
<div class="caution" id="obs_11_0042__note183475244419"><span class="cautiontitle"> CAUTION: </span><div class="cautionbody"><p id="obs_11_0042__p98341052114418">If your object needs encryption, do not use this parameter.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row14988181814356"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p1098811817356">p</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p14989181813352">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p49897182353">The maximum number of concurrent multipart upload tasks when uploading a file. The default value is the value of <strong id="obs_11_0042__b11146123118378">defaultParallels</strong> in the configuration file.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row7456112216356"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p1045612212352">threshold</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p74561122123519">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p114561522173511">The threshold for enabling multipart upload, in bytes. The default value is the value of <strong id="obs_11_0042__b1139713358465">defaultBigfileThreshold</strong> in the configuration file.</p>
|
|
<div class="note" id="obs_11_0042__note956121318501"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="obs_11_0042__ul182059695115"><li id="obs_11_0042__li1320515655118">If the size of the file or folder to be uploaded is smaller than the threshold, upload it directly. Otherwise, a multipart upload is required.</li><li id="obs_11_0042__li1651511123516">If you upload a file or folder directly, no part record is generated, and resumable transmission is not supported.</li><li id="obs_11_0042__li1184794414422">This parameter value can contain a unit, for example, <strong id="obs_11_0042__b125262712516">1MB</strong> (indicating 1,048,576 bytes).</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row13242162823512"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p324212285352">acl</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p82428286353">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p16811512123619">The access control policies that can be specified when synchronously uploading files. Possible values are:</p>
|
|
<ul id="obs_11_0042__ul1273864144412"><li id="obs_11_0042__li17738649445">private</li><li id="obs_11_0042__li1551213137447">public-read</li><li id="obs_11_0042__li1287691813449">public-read-write</li><li id="obs_11_0042__li370063135219">bucket-owner-full-control</li></ul>
|
|
<div class="note" id="obs_11_0042__note1790113183525"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0042__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_0042__row10780184745015"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p19533119154211">sc</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p4533191944218">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p86547153813">The storage classes of objects that can be specified when synchronously uploading files. Possible values are:</p>
|
|
<ul id="obs_11_0042__ul175651814214"><li id="obs_11_0042__li1256512172114"><strong id="obs_11_0042__b1854311482100">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_0042__li10565181142113"><strong id="obs_11_0042__b948925943410">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_0042__li756616110216"><strong id="obs_11_0042__b6734321352">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_0042__row15476193193517"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p15476113117359">meta</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p3476173116357">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p1447673143520">The customized metadata that can be specified when uploading files. The format is <strong id="obs_11_0042__b18642117153113">key1:value1#key2:value2#key3:value3</strong>.</p>
|
|
<div class="note" id="obs_11_0042__note2863162085514"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0042__p686342013559">The preceding value indicates that the object in the bucket contains three groups of customized metadata after the file is uploaded: <strong id="obs_11_0042__b89423875116">key1:value1</strong>, <strong id="obs_11_0042__b5950387516">key2:value2</strong>, and <strong id="obs_11_0042__b179773875113">key3:value3</strong>.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row1898318335357"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p139834336354">ps</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p20983173343511">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p161953211218">The size of each part in a multipart upload task, in bytes. The value ranges from <strong id="obs_11_0042__b379295075516">100KB</strong> to <strong id="obs_11_0042__b67921250195514">5GB</strong>. The default value is the value of <strong id="obs_11_0042__b1979205045510">defaultPartSize</strong> in the configuration file.</p>
|
|
<div class="note" id="obs_11_0042__note0518193012426"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="obs_11_0042__ul835113517435"><li id="obs_11_0042__li635193513432">This parameter value can contain a unit, for example, <strong id="obs_11_0042__b383611311518">1MB</strong> (indicating 1,048,576 bytes).</li><li id="obs_11_0042__li144561220153810">The parameter can be set to <strong id="obs_11_0042__b2058883394616">auto</strong>. In this case, obsutil automatically sets the part size for each multipart task based on the source file size.</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row83017445358"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p83084493510">cpd</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p830044143513">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p730944183517">The folder where the part records reside. The default value is <strong id="obs_11_0042__b154521528192415">.obsutil_checkpoint</strong>, the subfolder in the home directory of the user who executes obsutil commands.</p>
|
|
<div class="note" id="obs_11_0042__note13886557132615"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0042__p118866577266">A part record is generated during a multipart upload and saved to the <strong id="obs_11_0042__b512314618139">upload</strong> subfolder. After the upload succeeds, its part record is deleted automatically. If the upload fails or is suspended, the system attempts to resume the task according to its part record when you perform the upload the next time.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row20127634366"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p51273333618">j</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p989613496247">Optional for synchronously uploading a folder (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p112661531143816">The maximum number of concurrent tasks for uploading a folder synchronously. The default value is the value of <strong id="obs_11_0042__b13318131385">defaultJobs</strong> in the configuration file.</p>
|
|
<div class="note" id="obs_11_0042__note891964620819"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="obs_11_0042__p1091964618820">The value is ensured to be greater than or equal to 1.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row152961440116"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p93091157917">exclude</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p1631217571015">Optional for synchronously uploading a folder (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p63147571114">The file matching patterns that are excluded, for example: <strong id="obs_11_0042__b1700257182615">*.txt</strong></p>
|
|
<div class="note" id="obs_11_0042__note860825419155"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="obs_11_0042__ul83178571118"><li id="obs_11_0042__li143200571918">The asterisk (*) represents any group of characters, and the question mark (?) represents any single character. For instance, <strong id="obs_11_0042__b19146165942616">abc*.txt</strong> indicates any file whose name starts with <strong id="obs_11_0042__b10147759172611">abc</strong> and ends with <strong id="obs_11_0042__b15148105942616">.txt</strong>.</li><li id="obs_11_0042__li159874403410">You can use <strong id="obs_11_0042__b240614242715">\*</strong> to represent <strong id="obs_11_0042__b44078212718">*</strong> and <strong id="obs_11_0042__b140812102715">\?</strong> to represent <strong id="obs_11_0042__b1440992132711">?</strong>.</li><li id="obs_11_0042__li232319571115">If the name of the file to be uploaded matches the value of this parameter, the file is skipped.</li></ul>
|
|
</div></div>
|
|
<div class="notice" id="obs_11_0042__note17161195812153"><span class="noticetitle"> NOTICE: </span><div class="noticebody"><ul id="obs_11_0042__ul877892116516"><li id="obs_11_0042__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_0042__li4750153912101">The matching pattern applies to the absolute file path (including the file name and file directory).</li><li id="obs_11_0042__li1148165015513">The matching pattern takes effect only for files in the folder.</li><li id="obs_11_0042__li448915419327">Multiple <strong id="obs_11_0042__b9786175317546">exclude</strong> parameters can be specified, for example, <strong id="obs_11_0042__b20786135313549">-exclude=*.xxx -exclude=*.xxx</strong>.</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row15404620173616"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p64040209360">include</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p1856190112516">Optional for synchronously uploading a folder (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p85831634179">The file matching patterns that are included, for example: <strong id="obs_11_0042__b1936152316275">*.jpg</strong></p>
|
|
<div class="note" id="obs_11_0042__note6126191912710"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="obs_11_0042__ul144557173539"><li id="obs_11_0042__li104555174537">The asterisk (*) represents any group of characters, and the question mark (?) represents any single character.</li><li id="obs_11_0042__li83022046113412">You can use <strong id="obs_11_0042__b17420426142714">\*</strong> to represent <strong id="obs_11_0042__b8421122632715">*</strong> and <strong id="obs_11_0042__b16422202622719">\?</strong> to represent <strong id="obs_11_0042__b7423726122711">?</strong>.</li><li id="obs_11_0042__li442714198534">Only after identifying that the name of the file to be uploaded does not match the value of <strong id="obs_11_0042__b22581581369">exclude</strong>, the system checks whether the file name matches the value of this parameter. If yes, the file is uploaded. If not, the file is skipped.</li></ul>
|
|
</div></div>
|
|
<div class="notice" id="obs_11_0042__note7627205718163"><span class="noticetitle"> NOTICE: </span><div class="noticebody"><ul id="obs_11_0042__ul1024816334581"><li id="obs_11_0042__li13248133155813">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_0042__li1797064820102">The matching pattern applies to the absolute file path (including the file name and file directory).</li><li id="obs_11_0042__li1022917497107">The matching pattern takes effect only for files in the folder.</li><li id="obs_11_0042__li1352381183210">Multiple <strong id="obs_11_0042__b1180819545549">include</strong> parameters can be specified, for example, <strong id="obs_11_0042__b10808654175410">-include=*.xxx -include=*.xxx</strong>.</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row15153136881"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p171556361988">at</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p191555361986">Optional for synchronously uploading a folder (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p715611361584">Indicates that when synchronously uploading a folder, only the files whose latest access time is within the value of <strong id="obs_11_0042__b6483141362618">timeRange</strong> are uploaded.</p>
|
|
<div class="note" id="obs_11_0042__note12558677146"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="obs_11_0042__ul855817111418"><li id="obs_11_0042__li7558979145">This parameter must be used together with <strong id="obs_11_0042__b18861181317257">timeRange</strong>.</li></ul>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row12705113810233"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p3706103892310">disableDirObject</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p14706163817236">Optional for synchronously uploading folders (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p5706938162317">Indicates the folders themselves are not uploaded as an object. Configuring this parameter can avoid uploading empty folders to a bucket. If a folder contains files, the files will be uploaded and the original path format is retained.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row1258034674412"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p496314014481">timeRange</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p1664510223494">Optional for synchronously uploading a folder (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p16963940134813">The time range matching pattern when synchronously uploading files. Only files whose latest modification time is within the configured time range are uploaded.</p>
|
|
<p id="obs_11_0042__p1467441919542">This pattern has a lower priority than the file matching patterns (<strong id="obs_11_0042__b154809501181">exclude</strong>/<strong id="obs_11_0042__b34822501581">include</strong>). That is, the time range matching pattern is executed after the configured file matching patterns.</p>
|
|
<div class="note" id="obs_11_0042__note8766915165919"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="obs_11_0042__ul19272430145915"><li id="obs_11_0042__li12731730115918">The matching time range is represented in <em id="obs_11_0042__i13561927173114">time1</em><strong id="obs_11_0042__b0357172733120">-</strong><em id="obs_11_0042__i03571276318">time2</em>, where <em id="obs_11_0042__i2035820277313">time1</em> must be earlier than or the same as <em id="obs_11_0042__i193593270311">time2</em>. The time format is <em id="obs_11_0042__i7359102715317">yyyyMMddHHmmss</em>.</li><li id="obs_11_0042__li32731530185916">Automatic formatting is supported. For example, yyyyMMdd is equivalent to yyyyMMdd000000, and yyyyMM is equivalent to yyyyMM01000000.</li><li id="obs_11_0042__li5185481610">If this parameter is set to <strong id="obs_11_0042__b697622914312">*-</strong><em id="obs_11_0042__i897611299316">time2</em>, all files whose latest modification time is earlier than <em id="obs_11_0042__i1097792943117">time2</em> are matched. If it is set to <em id="obs_11_0042__i199770297314">time1</em><strong id="obs_11_0042__b89783292318">-*</strong>, all files whose latest modification time is later than <em id="obs_11_0042__i1697822963118">time1</em> are matched.</li></ul>
|
|
</div></div>
|
|
<div class="notice" id="obs_11_0042__note1078981817591"><span class="noticetitle"> NOTICE: </span><div class="noticebody"><p id="obs_11_0042__p3426114111312">Time in the matching pattern is the UTC time.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row182121926282"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p10122175516">mf</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p1562018121550">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p31226718512">Indicates that the name matching pattern (<strong id="obs_11_0042__b935410221945">include</strong> or <strong id="obs_11_0042__b193551822845">exclude</strong>) and the time matching pattern (<strong id="obs_11_0042__b635519221842">timeRange</strong>) also take effect on folders.</p>
|
|
<p id="obs_11_0042__p15797105118514"></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="obs_11_0042__row1015315386301"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p13911642133014">o</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p0913194217303">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__p139151442123019">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_0042__b197651153192016">.obsutil_output</strong>, a subfolder in the user's home directory where obsutil commands are executed.</p>
|
|
<div class="note" id="obs_11_0042__note114181972212"><span class="notetitle"> NOTE: </span><div class="notebody"><ul id="obs_11_0042__ul101190347408"><li id="obs_11_0042__li111993418408">A result file should be named as follows: <strong id="obs_11_0042__b84361234105415">sync_{succeed | failed | warning}_report_</strong><em id="obs_11_0042__i57015165411">time</em><strong id="obs_11_0042__b481515205412">_TaskId.txt</strong>.</li><li id="obs_11_0042__li412103664016">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_0042__b8962519338">recordMaxLogSize</strong> and <strong id="obs_11_0042__b69612515331">recordBackups</strong> in the configuration file.</li><li id="obs_11_0042__li915415811312">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_0042__obs_11_0013_b5396121718320">cp_failed_report_</strong><em id="obs_11_0042__obs_11_0013_i1639621714325">time</em><strong id="obs_11_0042__obs_11_0013_b1739631753215">_</strong><em id="obs_11_0042__obs_11_0013_i203979172328">TaskId</em><strong id="obs_11_0042__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_0042__row5678162683712"><td class="cellrowborder" valign="top" width="15.61%" headers="mcps1.3.5.2.1.4.1.1 "><p id="obs_11_0042__p153951131317">config</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.35%" headers="mcps1.3.5.2.1.4.1.2 "><p id="obs_11_0042__p12395135316">Optional (additional parameter)</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.03999999999999%" headers="mcps1.3.5.2.1.4.1.3 "><p id="obs_11_0042__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>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_11_0042__section6926520122416"><h4 class="sectiontitle">Response</h4><p id="obs_11_0042__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>
|
|
|