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.4 KiB
HTML
32 lines
2.4 KiB
HTML
<a name="obs_11_0047"></a><a name="obs_11_0047"></a>
|
|
|
|
<h1 class="topictitle1">Synchronous Download</h1>
|
|
<div id="body1547791494081"><p id="obs_11_0047__p489614582289">All commands in this section use the Linux operating system as an example to describe how to perform synchronous download operations.</p>
|
|
<p id="obs_11_0047__p4927118201719">Assume that bucket <strong id="obs_11_0047__b4867124125610">bucket-test</strong> contains the following objects:</p>
|
|
<pre class="screen" id="obs_11_0047__screen515823314463">obs://bucket-test/src1/
|
|
obs://bucket-test/src1/test3.txt
|
|
obs://bucket-test/src1/src2/
|
|
obs://bucket-test/src1/src2/test1.txt
|
|
obs://bucket-test/src1/src2/test2.txt
|
|
obs://bucket-test/src1/src3/</pre>
|
|
<p id="obs_11_0047__p1693019466342">Assume that a local folder is in the following structure:</p>
|
|
<pre class="screen" id="obs_11_0047__screen1426863513468"><span style="color:#666600;">└──</span> src1
|
|
<span style="color:#666600;">└──</span> test3.txt</pre>
|
|
<p id="obs_11_0047__p72561242278">Based on the structure of the preceding local folder and objects in the bucket, different synchronous download scenarios require different commands.</p>
|
|
<ul id="obs_11_0047__ul174731818476"><li id="obs_11_0047__li14521165111157">To synchronize all files and subfolders in the <strong id="obs_11_0047__b2043881188">src1</strong> folder in bucket <strong id="obs_11_0047__b172192017141115">bucket-test</strong> to the local <strong id="obs_11_0047__b129842841012">src1</strong> folder, the command is as follows:<pre class="screen" id="obs_11_0047__screen129934416261">./obsutil sync obs://bucket-test/src1 /src1</pre>
|
|
<p id="obs_11_0047__p463863152617">After the synchronization is successful, the following files are generated in the local <strong id="obs_11_0047__b16868112017213">src1</strong> folder:</p>
|
|
<pre class="screen" id="obs_11_0047__screen116391731192616"><span style="color:#666600;">└──</span> src1
|
|
<span style="color:#666600;"> ├──</span> src2
|
|
<span style="color:#666600;"> ├──</span> test1.txt
|
|
<span style="color:#666600;"> └──</span> test2.txt
|
|
<span style="color:#666600;">├──</span> src3
|
|
<span style="color:#666600;">└──</span> test3.txt</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>
|
|
|