Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

Show all

Help Center/ Object Storage Migration Service/ Best Practices/ Migrating Archived Data/ Migrating Archived Data in Alibaba Cloud OSS

Migrating Archived Data in Alibaba Cloud OSS

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

Alibaba Cloud OSS provides the ossutil tool that allows you to specify a prefix to restore the objects whose names start with the prefix.

NOTE:

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

This section uses Windows as an example.

Procedure

  1. Download the ossutil tool.

  2. Decompress the installation package and double-click ossutil.bat.
  3. Run the following command to generate a configuration file:

    <decompression-path>\ossutil& >ossutil64.exe config

  4. Configure the generated file in interactive mode.

    1. Run the following config command:
      ./ossutil64 config
    2. Configure the path of the configuration file as prompted.

      You are advised to press Enter to use the default path of the configuration file.

    3. Configure the interface language of ossutil as prompted.

      Enter CH or EN. By default, the interface of ossutil is using the same language as the operating system. This configuration takes effect after you run the config command.

    4. Follow the prompts to configure parameters Endpoint, AccessKey ID, AccessKey Secret, and STSToken.

      Parameter description:

      • Endpoint: specifies the endpoint of the region in which your source bucket is located. You can also add http:// or https:// to the endpoint to specify that you want ossutil to use to OSS. The default protocol is HTTP. For example, if you want to access an OSS bucket in the China (Shenzhen) region by using HTTPS, set the endpoint to https://oss-cn-shenzhen.aliyuncs.com.
      • AccessKey ID and AccessKey Secret: specify the access key pair of your Alibaba Cloud account.
      • stsToken: This parameter is required only when you use temporary access credentials to access an OSS bucket.

    Example:

    ./ossutil64 config 
    Enter the name configuration file name. The file name can contain a path. The default path is /home/user/.ossutilconfig. If you press the Enter key without specifying a different path, the file is generated in the default path.
    If you want to generate the file in another path, set the -config-file option to the path when you run this command.
    If you do not specify the configuration file path, the default configuration file /home/user/.ossutilconfig is used.
    If you press the Enter key without configuring the following parameters, these parameters are ignored. To obtain more information about the parameters, run the help config command.
    Enter the endpoint:
    Enter the AccessKey ID:
    Enter the AccessKey Secret:
    Enter the STS Token:

  5. Run the restore command to restore archive files.

    Command syntax:
    <binary-name> restore oss://<bucket-name>[/prefix][local_xml_file]
    [--encoding-type <value>]
    [--payer <value>]
    [--version-id <value>]
    [-r, --recursive]
    [-f, --force]
    [--retry-times <value>]
    [-j, --job <value>]
    CAUTION:

    The binary name at the beginning of the command line needs to be replaced based on the operating system. For example, replace the binary name with ./ossutil64 in a 64-bit Linux operating system. For details, see Getting Started with Alibaba Cloud OSS ossutil.

    The following table describes the parameters you can configure to run the restore command.

    Parameter

    Description

    bucketname

    The name of the bucket in which the objects to restore are stored.

    prefix

    The prefixes that are used to filter objects in the bucket.

    local_xml_file

    The local XML file used to store parameters that you can configure to restore archive objects.

    --encoding-type

    The method that is used to encode the value of the prefix parameter. The valid value is url.

    If you do not specify this parameter, the value of the prefix parameter is not encoded.

    --payer

    The payer of the traffic and request fees incurred when the command is run.

    To enable the requester to pay the traffic and request fees for accessing the resources in the specific path, set this parameter to requester.

    --version-id

    The version ID of the object that you want to restore. This parameter applies only to objects in buckets for which versioning is enabled or suspended.

    -r, --recursive

    If you specify this parameter, ossutil restores all objects whose names contain the specified prefix in the bucket.

    If you do not specify this parameter, ossutil restores only the specified object.

    -f, --force

    The operation that is forcibly performed without prompts.

    --retry-times

    The number of retries after the command fails to be run. The default value is 10. The value ranges from 1 to 500.

    -j, --job

    The number of concurrent tasks performed across multiple objects. The default value is 3. The value ranges from 1 to 10,000.

    For details, see the documents related to Alibaba Cloud OSS restore.

  6. Migrate restored data by referring to Migrating Data from Alibaba Cloud OSS to Huawei Cloud OBS.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback