Updated on 2024-12-19 GMT+08:00

Migrating Archived Data in UCloud US3

UCloud US3 allows you to restore an archive object on the console or restore multiple archive objects at a time using the us3cli tool.

Console

  1. Log in to the UCloud US3 console.
  2. On the Bucket page, locate the bucket, and click File Manage in the Operation column.
  3. Locate the file to be restored, click in the Operation column, and select Restore.

  4. Click OK. The file enters the restoration process. After its storage class changes to Standard, the file is restored.

    Restoring a file will incur data retrieval fees.

US3CLI

US3CLI is compatible with Windows, Linux, and macOS. Download and install the required version.

This section uses Windows as an example.

  1. Download US3CLI.

    us3cli-windows.exe

  2. Open the CLI as an administrator and switch to the directory where the us3cli-windows.exe file is stored.
  3. Run the following command to generate a configuration file.

    us3cli-windows.exe config
    1. Open the CLI as an administrator.
    2. After downloading us3cli-windows.exe, do not directly click the file to run it. Use the CLI to open and run this tool.
    3. If you cannot download the tool by clicking the proceeding link, copy the link to the address box of your browser and press Enter.

  4. Configure the generated file in interactive mode.

    #./us3cli config
    Enter the configuration item name: config1
    Create the configuration item: [config1]
    Enable encryption (y or n)? n
    Enter the API/Token public key [Current:]: xxxxxxxxxxxxxxxxxx
    Enter the API/Token private key [Current:]: xxxxxxxxxxxxxxxxxx
    Region list:
    No.     RegionName      Region       
    0       Beijing        cn-bj        
    1       Shanghai 2        cn-sh2       
    2       Guangzhou        cn-gd        
    3       Hong Kong        hk           
    4       Los Angeles        us-ca        
    5       Singapore        sg           
    6       Jakarta        idn-jakarta  
    7       Taipei        tw-tp        
    8       Lagos        afr-nigeria  
    9       Sao Paulo        bra-saopaulo 
    10      Dubai        uae-dubai    
    11      Frankfurt        ge-fra       
    12      Ho Chi Minh City        vn-sng       
    13       Washington        us-ws        
    14      Mumbai        ind-mumbai   
    15      Seoul        kr-seoul     
    Enter a region No.: 0
    Intranet and extranet list:
    No.     Network 
    0       extranet    
    1       intranet    
    Select or enter the intranet or extranet No.: 0
    The selected endpoint is [cn-bj.ufileos.com],[Current:]. Press Enter to use the default endpoint or customize one.
    Final configurations:
    ConfigName: config1 
    AccessKey: xxxxxxxxxxxxxxxxxxxxxx 
    SecretKey: xxxxxxxxxxxxxxxxxxxxxx 
    Endpoint: cn-bj.ufileos.com Check the endpoint and press Enter.
    Enable HTTPS (y or n)? n
    Enable proxy (y or n):n
    Configuration file [ config1 ] has been modified.
    Whether to use the configuration as the default configuration (the current default configuration is < config >)(y or n)?
    1. When a profile is created for the first time, this configuration is automatically used as the default configuration.
    2. Only the public and private keys are encrypted. The current configuration file can be encrypted only when it is created for the first time.
    3. When entering the proxy address, you only need to specify ip:port. The client will add https:// to the address if HTTPS is enabled or add http:// if HTTPS is not enabled.

  5. Run the following restore commands to restore files in the bucket. For details, see the restore section in the US3CLI document.

    • Command for restoring a single file
      ./us3cli restore us3://bucket/test.txtCopyErrorSuccess
    • Command for restoring all files in a directory
      ./us3cli restore -r us3://bucket/test
    • Command for restoring 10 files at a time
      ./us3cli restore us3://bucket/test --parallel 10
      • Replace bucket with your bucket name.
      • Replace test with the names of files or folders to be restored.
      • --parallel specifies the number of files to be restored concurrently. The default value is 10. You can modify it as needed.

    For details, see the restore section in the US3CLI document.

  6. Migrate restored data by referring to Migrating Data from UCloud US3 to Huawei Cloud OBS.