Help Center/ Object Storage Service/ Tools Guide/ obsutil/ Bucket Commands/ Obtaining the Back-to-Source by Mirroring Rule
Updated on 2026-09-20 GMT+08:00

Obtaining the Back-to-Source by Mirroring Rule

Function

You can use this command to obtain the back-to-source by mirroring rule of a bucket.

Command Line Structure

  • Windows
    obsutil mirror-back-to-source obs://bucket -method=get [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
  • macOS or Linux
    ./obsutil mirror-back-to-source obs://bucket -method=get [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

Examples

  • In Windows, run obsutil mirror-back-to-source obs://test-bucket -method=get -localfile=d:\temp\mirror-output.json to export the back-to-source by mirroring rule of bucket test-bucket to the local file mirror-output.json.
    obsutil mirror-back-to-source obs://test-bucket -method=get -localfile=d:\temp\mirror-output.json
    
    Start at 2024-09-30 07:59:28.8675681 +0000 UTC
    
    Get mirrorBackToSource rule succeed for bucket [test-bucket], requestId is [00000199766AD0AB4015BC408DBE55EC]

Parameter Description

Parameter

Optional or Mandatory

Description

bucket

Mandatory

The bucket name

method

Mandatory

The method. Set it to get when you obtain the back-to-source by mirroring rule.

localfile

Optional (additional parameter)

The local file to which the static website hosting configuration is exported. If this parameter is not specified, the configuration defaults to standard output.

config

Optional (additional parameter)

The user-defined configuration file for executing the current command. For details about parameters that can be configured, see Configuration Parameters.

e

Optional (additional parameter)

The endpoint

i

Optional (additional parameter)

The user's AK

k

Optional (additional parameter)

The user's SK

t

Optional (additional parameter)

The user's security token

Helpful Links