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
Help Center/ Object Storage Migration Service/ Best Practices/ Special Migration Scenarios/ Adding a Name Prefix or Path Prefix to Migrated Objects

Adding a Name Prefix or Path Prefix to Migrated Objects

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

Overview

The Specify Prefix parameter enables you to:

  • Add a name prefix to objects migrated to the destination bucket.

    For example, if you set Specify Prefix to Yes and specify the prefix Test-Prefix when you create a migration task or task group, source objects oms_a.txt and oms_b.txt will be renamed Test-Prefixoms_a.txt and Test-Prefixoms_b.txt after they are migrated to the destination bucket.

  • Add a path prefix to objects migrated to the destination bucket.

    For example, if you set Specify Prefix to Yes and specify the path prefix Test-Prefix/ when you create a migration task or task group, OMS will create a Test-Prefix/ directory in the root directory of the destination bucket, and migrate source objects, such as oms_a.txt and oms_b.txt to it. The paths to oms_a.txt and oms_b.txt will be Destination bucket name/Test-Prefix/oms_a.txt and Destination bucket name/Test-Prefix/oms_b.txt.

Scenarios

This section uses the File/Folder migration method as an example to describe how to configure Specify Prefix during the creation of a migration task or task group.

You can use Specify Prefix to:

Add a Name Prefix to Migrated Files

  1. Log in to the Huawei Cloud console.
  2. Click in the upper left corner and select the region where the destination bucket is located from the drop-down list.

    Figure 1 Selecting the region where the destination bucket is located

  3. Click Service List in the upper left corner, and choose Migration > Object Storage Migration Service.

    You can also enter OMS in the search box to quickly find OMS.
    Figure 2 Choosing OMS

  4. On the Migration Tasks page, click Create Migration Task in the upper right corner.

    Figure 3 Creating a migration task

  5. Read the service disclaimer, select I have read and agree to the service disclaimer, and click OK. The Create Migration Task page is displayed.

    Figure 4 Select Source/Destination

  6. Set parameters in the Select Source area. For details, see Table 1.

    Table 1 Parameters for configuring a source bucket

    Parameter

    Configuration

    Data Source

    Select Huawei Cloud.

    Access Key ID

    Enter the AK for the Huawei Cloud account to which the source bucket belongs.

    Secret Access Key

    Enter the SK for the Huawei Cloud account to which the source bucket belongs.

    Specify Source Bucket

    If you disable Specify Source Bucket (which is disabled by default), you need to:

    1. Select the bucket where the source data is stored from the Bucket drop-down list.

      OMS will check whether the source platform can be connected using the information you provided. Once the source platform is connected, all buckets in your account will show up in the Bucket drop-down list, provided your account has the necessary permissions to list buckets.

    NOTE:

    If the source account does not have the permissions required to list buckets, you need to enable Specify Source Bucket.

    If you enable Specify Source Bucket, you need to:

    1. Select the region where the source bucket is located from the Region drop-down list.
    2. In the Bucket text box, enter the name of the bucket or the directory to be migrated. The directory must have the bucket name included.
    3. Click Connect.

  7. Set parameters in the Select Destination area and click Next. For details, see Table 2.

    Table 2 Parameters for configuring a destination bucket

    Parameter

    Configuration

    Access Key ID

    Enter the AK for the Huawei Cloud account to which the destination bucket belongs.

    Secret Access Key

    Enter the SK for the Huawei Cloud account to which the destination bucket belongs.

    Bucket

    Select a destination OBS bucket for storing the migrated data.

  8. On the displayed Set Task Parameters page, set parameters.

    Figure 5 Setting task parameters

  9. In the Source Configuration area, set Migration Method to File/Folder.

    Figure 6 Selecting a migration method

  10. Click Select. In the Select File/Folder dialog box in Figure 7, select one or more files to be migrated and click OK.

    Figure 7 Selecting files

  11. In the Destination Configuration area, select Yes for Specify Prefix and enter a prefix, for example, Test-Prefix.

    Figure 8 Specifying a prefix

  12. Click Next to access the confirmation page.

    Figure 9 Confirmation

  13. Confirm the configuration and click Migrate Now.
  14. After the migration is complete, view the migrated files in the destination bucket. You will see the prefix Test-Prefix has been added to the names of these files.

    Figure 10 Verification

Add a Path Prefix to Migrated Files

  1. In the Source Configuration area, set Migration Method to File/Folder.

    Figure 11 Selecting a migration method

  2. Click Select. In the Select File/Folder dialog box in Figure 12, select one or more files to be migrated and click OK.

    Figure 12 Selecting files

  3. In the Destination Configuration area, select Yes for Specify Prefix and enter a path prefix, for example, Test-Prefix/.

    Figure 13 Specifying a path prefix

  4. Click Next to access the confirmation page.

    Figure 14 Confirmation

  5. Confirm the configuration and click Migrate Now.
  6. After the migration is complete, view the migrated files in the destination bucket. You will see that these files are all stored in the Test-Prefix/ directory of the destination bucket.

    Figure 15 Verification

Add a Name Prefix to Migrated Folders

  1. In the Source Configuration area, set Migration Method to File/Folder.

    Figure 16 Selecting a migration method

  2. Click Select on the left of the Bucket box. In the Select File/Folder dialog box, as shown in Figure 17, select one or more folders to be migrated and click OK.

    Figure 17 Selecting folders

  3. In the Destination Configuration area, select Yes for Specify Prefix and enter a prefix, for example, Test-Prefix.

    Figure 18 Specifying a prefix

  4. Click Next to access the confirmation page.

    Figure 19 Confirmation

  5. Confirm the configuration and click Migrate Now.
  6. After the migration is complete, view the migrated folders in the destination bucket. You will see the prefix Test-Prefix has been added to the names of these folders.

    Figure 20 Verification

Add a Path Prefix to Migrated Folders

  1. In the Source Configuration area, set Migration Method to File/Folder.

    Figure 21 Selecting a migration method

  2. Click Select on the left of the Bucket box. In the Select File/Folder dialog box, as shown in Figure 22, select one or more folders to be migrated and click OK.

    Figure 22 Selecting folders

  3. In the Destination Configuration area, select Yes for Specify Prefix and enter a path prefix, for example, Test-Prefix/.

    Figure 23 Specifying a path prefix

  4. Click Next to enter the confirmation page.

    Figure 24 Confirmation

  5. Confirm the configuration and click Migrate Now.
  6. After the migration is complete, view the migrated folders in the destination bucket. You will see that these folders are all moved to the Test-Prefix/ directory of the destination bucket.

    Figure 25 Verification

Add a Path Prefix to the Whole Bucket

  1. In the Source Configuration area, set Migration Method to File/Folder.

    Figure 26 Selecting a migration method

  2. In the Destination Configuration area, select Yes for Specify Prefix and enter a path prefix, for example, Test-Prefix/.

    Figure 27 Specifying a path prefix

  3. Click Next to access the confirmation page.

    Figure 28 Confirmation

  4. Confirm the configuration and click Migrate Now.
  5. After the migration is complete, view the directory where the entire bucket is stored. You will see all objects in the source bucket are moved to the Test-Prefix/ directory of the destination bucket.

    Figure 29 Verification

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