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>
32 lines
2.3 KiB
HTML
32 lines
2.3 KiB
HTML
<a name="obs_11_0048"></a><a name="obs_11_0048"></a>
|
|
|
|
<h1 class="topictitle1">Synchronous Copy</h1>
|
|
<div id="body1547791494081"><p id="obs_11_0048__p18774135112299">All commands in this section use the Linux operating system as an example to describe how to perform synchronous copy operations.</p>
|
|
<p id="obs_11_0048__p4927118201719">Assume that the source bucket <strong id="obs_11_0048__b1796794110518">bucket-src</strong> contains the following objects:</p>
|
|
<pre class="screen" id="obs_11_0048__screen776818585566">obs://bucket-src/src1/
|
|
obs://bucket-src/src1/test3.txt
|
|
obs://bucket-src/src1/src2/
|
|
obs://bucket-src/src1/src2/test1.txt
|
|
obs://bucket-src/src1/src2/test2.txt
|
|
obs://bucket-src/src1/src3/</pre>
|
|
<p id="obs_11_0048__p15719584341">Assume that the destination bucket <strong id="obs_11_0048__b1012982610522">bucket-dest</strong> contains the following objects:</p>
|
|
<pre class="screen" id="obs_11_0048__screen17712582343">obs://bucket-dest/src1/
|
|
obs://bucket-dest/src1/test3.txt</pre>
|
|
<p id="obs_11_0048__p14551164724818">Based on the structure of objects in the bucket, different synchronous copy scenarios require different commands.</p>
|
|
<ul id="obs_11_0048__ul174731818476"><li id="obs_11_0048__li1334253834912">To synchronize all files and subfolders in the <strong id="obs_11_0048__b14187936135210">src1</strong> folder in bucket <strong id="obs_11_0048__b55916925610">bucket-src</strong> to the <strong id="obs_11_0048__b3191173611521">src1</strong> folder in bucket <strong id="obs_11_0048__b141941436185213">bucket-dest</strong>, the command is as follows:<pre class="screen" id="obs_11_0048__screen1142954715014">./obsutil sync obs://bucket-src/src1 obs://bucket-dest/src1</pre>
|
|
<p id="obs_11_0048__p161831438155020">After the synchronous copy is complete, the objects in the destination bucket <strong id="obs_11_0048__b156251325115819">bucket-dest</strong> are as follows:</p>
|
|
<pre class="screen" id="obs_11_0048__screen1918316382507">obs://bucket-dest/src1/
|
|
obs://bucket-dest/src1/test3.txt
|
|
obs://bucket-dest/src1/src2/
|
|
obs://bucket-dest/src1/src2/test1.txt
|
|
obs://bucket-dest/src1/src2/test2.txt
|
|
obs://bucket-dest/src1/src3/</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_11_0027.html">Common Examples</a></div>
|
|
</div>
|
|
</div>
|
|
|