Creating a Migration Task
This section describes how to create a migration task.
Scenarios
If there is less than 3 TB of data or less than 5 million objects in a source bucket, create a migration task to quickly migrate the source data.
If there is more than 3 TB of data or more than 5 million objects to migrate in a source bucket, create a migration task group to migrate the source data quickly.
Prerequisites
- You have obtained the AK/SK pairs and required permissions for the source and destination platform accounts.
- The source platform account needs the following permissions:
- Listing all buckets
- Obtaining bucket location
- Listing objects
- Obtaining object metadata
- Obtaining object content
For details about how to obtain these permissions, see Source Permissions.
- The destination platform account needs the following permissions:
- Listing all buckets
- Obtaining bucket location
- Listing objects
- Obtaining object metadata
- Obtaining object content
- Listing uploaded parts
- Restoring archive objects
For details about how to obtain these permissions, see Destination Permissions.
- The source platform account needs the following permissions:
- You have created at least one bucket on OBS.
- You have created less than 5,000 migration tasks during the past 24 hours.
- You have less than 5,000 migration tasks in the Waiting to migrate state.
- You have registered an account with HUAWEI CLOUD and completed real-name authentication.
Procedure
- Log in to the HUAWEI CLOUD console.
- 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
- 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
- On the Migration Task page, click Create Migration Task in the upper right corner. Figure 3 Creating a migration task
- Read the privacy statement, select Agree to the above privacy agreements, and click OK. The Create Migration Task page is displayed. Figure 4 Select Source/Destination
- 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
Enter the access key ID (AK) of the HUAWEI CLOUD account to which the source bucket belongs.
Secret Access Key
Enter the secret access key (SK) of the HUAWEI CLOUD account to which the source bucket belongs.
Specify Bucket Name
Disable Specify Bucket Name (This feature is disabled by default.)
- Click Connect to Source Bucket next to Bucket. All buckets under the account are listed.
- Select the bucket you want to migrate from the drop-down list.
NOTE:If the source account does not have the permissions required to list buckets, enable Specify Bucket Name.
Enable Specify Bucket Name.
- Select the region where the source bucket resides from the Select Region drop-down list.
- In the Bucket Name or Path text box, enter the source bucket name or the source bucket path with the bucket name.
- Click Connect to Source Bucket.
- Set parameters in the Select Destination area. For details, see Table 2.
Table 2 Destination parameters Parameter
Configuration
Access Key
Enter the AK of the HUAWEI CLOUD account to which the destination bucket belongs.
Secret Access Key
Enter the SK of the HUAWEI CLOUD account to which the destination bucket belongs.
After you enter the AK and SK, click Connect to Destination Bucket.
Bucket
Select the destination OBS bucket for storing the migrated data.
- Click Next. The Set Task Parameters page is displayed. Figure 5 Set Task Parameters
- Select a migration method. The following table lists the details about each method.
Migration Method
Scenario
Description
You have obtained the names of files to be migrated, or the folders where the files to be migrated are located.
- When you select folders, all files in the selected folders will be migrated.
- When you select files, all selected files will be migrated.
You can select both folders and files for migration. If you do not select specific files or folders, all objects in the bucket will be migrated by default.
You have obtained the names of all the objects to be migrated, saved the object names in a .txt file, and uploaded the file to an OBS bucket on HUAWEI CLOUD.
- List File Bucket (HUAWEI CLOUD): The bucket where the list files are stored must be in the same region as the destination bucket. Otherwise, the list files cannot be selected.
- Select Object List File: Select the .txt files that contain the names of all objects to be migrated.
NOTE:- Each object list file cannot exceed 100 MB.
- The object list file must be a .txt file, and ContentType in the metadata of the file must be text/plain.
- The object list file must be in UTF-8 without BOM.
- Each line in the object list file can contain only one object name, and the object name must be URL encoded.
- Spaces are not allowed in each line in the object list file. Spaces may cause migration failures because they may be mistakenly identified as object names.
- The length of each line in the object list file cannot exceed 65,535 characters, or the migration will fail.
- ContentEncoding cannot be set in the metadata of the object list file, or the migration will fail.
- Archive data can only be accessed and obtained by OMS after it is restored. If the object list files are archive, manually restore them before migration.
You know the naming format of the objects to be migrated, and the objects to be migrated are named with the same prefix.
After a prefix is added, all objects whose names start with the prefix will be migrated.
If this parameter is not specified, all objects in the bucket will be migrated.
- (Optional) Select File/Folder.
- Click Select under the bucket name. The Select File/Folder dialog box is displayed.
- Select the folders or files to be migrated.
You can select both folders and files for migration. If you do not select specific files or folders, all objects in the bucket will be migrated by default.
Figure 6 Selecting folders
Figure 7 Selecting files
- Click OK. The selected files or folders are displayed. Figure 8 Selected files and folders
- (Optional) Select Object List.
- In the List File Bucket (HUAWEI CLOUD) select the bucket where the object list files is stored.
If the bucket used for storing object list files is not located in the same region as the destination bucket, you cannot select the object list files.
Figure 9 Selecting the bucket where the object list files are stored
- Click Select next to Select Object List File. In the displayed Select Object List File dialog box, select the .txt file that contains the names of all objects to be migrated, and click OK. Figure 10 Selecting object list files
- In the List File Bucket (HUAWEI CLOUD) select the bucket where the object list files is stored.
- (Optional) Select Object Name Prefix.
- Enter the names or name prefixes of the objects to be migrated in the text box under Bucket. Figure 11 Entering the names or name prefixes of objects to be migrated
- Click Add. The system will automatically list the matched objects. Figure 12 Matched objects
You can click
to delete the objects that do not need to be migrated from the list. If no object names or name prefixes are specified, all objects in the source bucket will be migrated.
- Enter the names or name prefixes of the objects to be migrated in the text box under Bucket.
- (Optional) Click Show next to Advanced Settings. Set parameters in Advanced Settings based on Table 3. Figure 13 Advanced settings
Table 3 Advanced settings Parameter
Description
(Optional) Data Encryption
If you select KMS, migrated data is encrypted before being transferred to the destination OBS buckets.
Failed Object Record
The default value is Yes.
- If this option is set to No, the system will not record the objects that fail to be migrated. If the migration fails and needs to be retried, all objects in the source bucket need to be migrated again.
- If this option is set to Yes, the system will record the objects that fail to be migrated. If the migration fails and needs to be retried, only the failed objects need to be migrated again.
Archive Data Restoration
The default value is No. You are advised to retain the default configuration, and restore any archived data using OBS tools before the migration. For details, see Restoring Objects from Archive Storage.
- If this option is set to No, the system directly records archive objects in the list of objects that failed to be migrated and continues to migrate other objects.
- If this option is set to Yes, the system automatically restores and migrates archive objects.
Incremental Data
This parameter is used to specify whether to filter source objects to be migrated by time. The default value is No.
- If this option is set to No, source objects are not filtered by time.
- If this option is set to Yes, only the source objects that are modified or added after the specified time are migrated.
SMN Notification
Specifies whether to use SMN to notify you of migration results.
- If this option is set to No, no SMN message is sent after the migration.
- If this option is set to Yes, you will receive an SMN message informing you of the migration results.
Traffic Limit
Set the maximum bandwidth for the migration task during a specified period of time.
- If you do not need to limit migration traffic, select No.
- If you need to limit migration traffic, select Yes.
Description
In the Description area, enter a brief description about the migration task.
- Click Next to enter the confirmation page. Figure 14 Confirmation
- Confirm the source information, destination information, task parameters, and advanced settings, and click Migrate Now. A message is displayed, indicating that the migration task group is successfully created. The migration task is displayed in the migration task list.
After the task is created, a task ID is generated for you for quick identification. It is displayed in the upper left corner of the task list. It is composed of the source bucket name, destination bucket name, and time sequence ID.
Related Operations
You can perform the following operations on a created migration task.
| Operation | Description |
|---|---|
| View a migration task. | For details, see Viewing a Migration Task. |
| Manage a migration task. | For details, see Managing a Migration Task. |
Last Article: Preparing for Migration
Next Article: Creating a Migration Task Group
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.