Files
doc-exports/docs/obs/tool-obsutil/obs_11_0048.html
weihongmin1 a41a4e0331 OBS Util 0115 Version
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com>
Co-authored-by: weihongmin1 <weihongmin1@huawei.com>
Co-committed-by: weihongmin1 <weihongmin1@huawei.com>
2026-02-17 10:18:57 +00:00

2.3 KiB

Synchronous Copy

All commands in this section use the Linux operating system as an example to describe how to perform synchronous copy operations.

Assume that the source bucket bucket-src contains the following objects:

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/

Assume that the destination bucket bucket-dest contains the following objects:

obs://bucket-dest/src1/
obs://bucket-dest/src1/test3.txt

Based on the structure of objects in the bucket, different synchronous copy scenarios require different commands.

  • To synchronize all files and subfolders in the src1 folder in bucket bucket-src to the src1 folder in bucket bucket-dest, the command is as follows:
    ./obsutil sync obs://bucket-src/src1  obs://bucket-dest/src1

    After the synchronous copy is complete, the objects in the destination bucket bucket-dest are as follows:

    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/