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>
2.3 KiB
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 from the src1 folder in the bucket-src bucket to the src1 folder in the bucket-dest bucket, use the following command:
./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/
Parent topic: Common Examples