Creating a Migration Task
Scenarios
This section describes how to create a task to migrate your source objects.
Background
OMS supports the following migration sources:
- HUAWEI CLOUD
- AWS China
- Alibaba Cloud
- Microsoft Azure
- Tencent Cloud
- Qiniu Cloud
- QingCloud
- Baidu Cloud
- Kingsoft Cloud
- UCloud
- HTTP/HTTPS data source
OMS makes API calls to the object storage services on source platforms during migration. These API calls may generate fees on the source platforms and you will be responsible for those fees based on those source platform billing structures.
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 management console.
- Click
in the upper left corner and select the desired region. - Click Service List. Under Migration, click Object Storage Migration Service.
The Object Storage Migration Service page is displayed.
- In the upper right corner, click Create Migration Task.
Read the privacy statement, select Agree to the above privacy agreements, and click OK.
- For step Select Source/Destination, you need to:
- Select the source platform. For details about the parameters, see Table 1.
Table 1 Source platform parameters Parameter
Description
Data Source
Specifies the source cloud service provider.
(Optional) appID
Specifies the identifier of the account for logging in to the Tencent Cloud console. If the selected cloud service provider is Tencent Cloud, appID must be specified.
Access Key
Specifies the AK of the source platform account. Enter a maximum of 100 characters.
Secret Access Key
Specifies the SK of the source platform account. The SK matches with the AK. Enter a maximum of 100 characters.
Specify Bucket Name
If you do not have the permissions required to list buckets but have the permissions to list objects in buckets, obtain object metadata, and obtain objects, enable this parameter to specify the path of the source bucket for the migration.
For details, see Table 2.
Table 2 Description of Specify Bucket Name If You...
Then...
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. NOTE:
OMS will check whether the source platform information is correct. If the entered information is correct, a message is displayed indicating that the source bucket is connected.
Disable Specify Bucket Name (This feature is disabled by default.)
- Click Connect to Source Bucket.
OMS will check whether the source platform information is correct. If the entered information is correct and your account has the permissions needed to list buckets, all buckets are listed in the Bucket drop-down list.
- In the Bucket drop-down list, select the bucket where the objects to be migrated reside.
NOTE:If the source account does not have the permissions required to list buckets, you need to enable Specify Bucket Name.
- Select the destination platform. For details about the parameters, see Table 3.
Table 3 Destination platform parameters Parameter
Description
Access Key
Specifies the AK for accessing HUAWEI CLOUD. Enter a maximum of 100 characters.
Secret Access Key
Specifies the SK for accessing HUAWEI CLOUD. The SK matches with the AK. Enter a maximum of 100 characters.
After entering the AK and SK, click Connect to Destination Bucket.
Bucket
Specifies the destination OBS bucket for storing the migrated data.
- Select the source platform. For details about the parameters, see Table 1.
- Click Next to set task parameters.
- Select a migration method in the Select Migration Method area.
Migration Method
Description
File/Folder
Click Select, and in the displayed dialog box, select the files or folders to be migrated, and click OK. You can click
to delete a selected file or folder from the list. NOTE:- If you select Qiniu Cloud for Data Source, you cannot select files or folders.
- If you do not select specific files or folders, all objects in the source bucket will be migrated.
- For each migration task, you can select up to 500 files and folders in a given directory.
- The name of any individual object on OBS cannot exceed 1,024 characters. If the name of a migrated object on OBS exceeds this limit, the migration task will fail.
Object List
Generally, this parameter is used to migrate incremental objects. You need to write the names of source objects to be migrated into an object list file and store the file in an OBS bucket on HUAWEI CLOUD. OMS migrates all objects specified in the object list file.
- Select List File Bucket (HUAWEI CLOUD). NOTE:
The buckets listed are the buckets obtained by entering the destination AK and SK in 5.b.
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.
- Click Select next to Select Object List File, select the target object list files, and click OK.
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.
Object Name Prefix
Enter the names or prefixes of objects to be migrated and click Add. The system will automatically list the matched objects. You can click
to delete the objects that do not need to be migrated from the list.NOTE:If no object names or name prefixes are specified, all objects in the source bucket will be migrated.
URL List
Generally, this setting is used to migrate HTTP/HTTPS source data. You need to write the URLs of the files to be migrated and their destination object names into a URL list file and store the file in an OBS bucket on HUAWEI CLOUD. OMS migrates all files specified in the URL list file.
- Select List File Bucket (HUAWEI CLOUD). NOTE:
- The buckets listed are the buckets obtained by entering the destination AK and SK in 5.b.
- 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.
- For security purposes, if the migration source supports both HTTP and HTTPS, you are advised to use HTTPS during the migration. If HTTP is used, data may be eavesdropped on, tampered with, or vulnerable to man-in-the-middle or replay attacks.
- If the data to be migrated is non-public and you do not want to make the data public, you are advised to use other migration methods.
- URL redirection is not supported.
- Click Select next to the Specified URL File area, select the target URL list files, and click OK. NOTE:
- Each URL list file cannot exceed 100 MB.
- The URL list file must be a .txt file, and ContentType in the metadata of the file must be text/plain.
- The URL list file must be in UTF-8 without BOM.
- Each line in the URL list file can contain only one URL and one destination object.
- The length of each line in the URL list file cannot exceed 65,535 characters, or the migration will fail.
- ContentEncoding cannot be set in the metadata of the URL list file, or the migration will fail.
- In the URL list file, each line uses a tab character (\t) to separate the URL from the destination object name. The format is [URL][Tab character][Destination object name]. The destination object name is encoded using URL Encode. For example:
http://xxx.obs.myhuaweicloud.com/doc/file1.txt doc%2f%e6%96%87%e4%bb%b61.txt http://xxx.obs.myhuaweicloud.com/doc/thefile2.txt doc%2fthefile2.txt http://xxx.obs.myhuaweicloud.com/the%20file.txt the%20file.txt http://xxx.obs.myhuaweicloud.com/the%20file2.txt the+file2.txt http://xxx.obs.myhuaweicloud.com/doc/thefile.txt doc/thefile.txt
Use a tab character (Tab key on the keyboard) to separate the URL from the destination object name. Do not use spaces.
In the preceding examples, after the files represented by the URLs are copied to the destination bucket, the objects are named doc/doc/thefile2.txt, the file.txt, the file2.txt, and doc/thefile.txt.
- Spaces are not allowed in each line in the URL list file. Spaces may cause migration failures because they may be mistakenly identified as object names.
- (Optional) Set Source Parameters. Parameters described in Table 4 are only available if the source cloud service provider offers the related functions.
Table 4 Source parameters Parameter
Description
Use Source Custom Domain Name
If the default domain name cannot meet your migration requirements, then if the source cloud service provider supports custom domain names, you can bind a custom domain name to the source bucket, and enable the CDN service on the source platform to reduce data download fees.
NOTE:- If anti-leeching is used, you are advised to disable it or contact HUAWEI CLOUD technical support.
- If the source cloud service provider is Qiniu Cloud, this option is selected by default to ensure a smooth migration because Qiniu Cloud has restrictions on default domain names.
If you select this option, you must:
- Select a transmission protocol for Transfer Protocol. NOTE:
HTTPS is more secure than HTTP and is recommended.
If the data to be migrated is non-public and you do not want to make the data public, you are advised to use other migration methods.
- Enter a custom domain name of the bucket for Custom Bucket Domain Name.
- If you use the CDN authentication provided by the source cloud service provider, select Enable CDN Authentication and configure the authentication type and keys. NOTE:
- You can use CDN authentication only after configuring CDN by referring to documents of the source cloud service provider.
- The fees generated by using CDN on the source platform are billed by the source cloud service provider.
- URI redirection is not supported.
- Click Check to check whether the configuration is correct.
- If the configuration fails the check, click Details to view the failure causes.
- If the configuration passes the check, complete other migration configurations.
Archive Data Restoration
Only restored archive data can be migrated. You can select this option if your source cloud service provider supports automatic restoration of archive data.
- If you select this option, the system automatically restores and migrates archive objects in the migration task. If an archive object fails to be restored, the system records it in the list of objects that failed to be migrated and continues to migrate other objects in the migration task.
- If you do not select this option, the system directly records archive objects in the list of objects that failed to be migrated and continues to migrate other objects in the migration task.
NOTE:- Currently, the following cloud service providers can automatically restore archive objects: HUAWEI CLOUD, Alibaba Cloud, Kingsoft Cloud, and Tencent Cloud.
- It takes at least a minute to restore an archive object. The larger the archive object is, the longer it takes to restore it, but if an archive object cannot be restored within three minutes, the restoration fails. The time needed depends on the cloud service provider. For details, see related documents of the specific cloud service provider.
- Two types of fees are generated during archive data restoration: fees for API calls and fees for archive object restoration. These fees are billed by the source cloud service provider.
- After restoration, archive objects will be in restored state for a certain period of time. During this period, objects can be downloaded or read. After this period expires, archive objects need to be restored again for migration. For details about how long they stay in the restored state, see related documents from the cloud service provider.
- After objects are migrated from the source platform to HUAWEI CLOUD, the storage class of the migrated objects is the same as that of the destination bucket.
- Click Show next to Advanced Settings to expand the advanced parameters.
- (Optional) Set Advanced Settings parameters.
Table 5 Advanced Settings parameters Parameter
Description
Data Encryption
If you select KMS, migrated data is encrypted before being transferred to the destination OBS buckets.NOTE:Using KMS to encrypt migrated data may decrease the migration speed by about 10%.
This option is only available if KMS encryption is supported in the current region.
Failed Object Record
Specifies whether to record the objects that fail to be migrated.
- If this parameter is set to No, the system will not record the objects that fail to be migrated. If the migration fails, all objects in the source bucket need to be transmitted again.
- If this parameter 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.
NOTE:The objects that fail to be migrated are recorded in an object list file named by the task name and uploaded to the oms/failed_object_lists directory of the destination bucket.
This file contains information about the failed migration tasks, including the failure causes, occurrence time (local UTC), URL-encoded names of failed objects, non-URL-encoded names of failed objects, and error codes returned by source SDKs.
This file is stored in the destination bucket after the objects in the file are successfully retransmitted. If you do not need the file, delete it manually.
Incremental Data
Specifies whether to filter source objects to be migrated by time.
- 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. You need to click
to specify the time.
SMN Notification
Specifies whether to use SMN to notify you of migration results.- If this parameter is set to No, no SMN message is sent after the migration.
- If this parameter is set to Yes, you will receive an SMN message informing you of the migration results.
Perform the following steps to set SMN parameters:
- Click Add next to the Select SMN Topic area. The Select SMN Topic dialog box is displayed.
- Select a topic for receiving SMN messages and click OK.
If OMS is not authorized to publish messages to the selected SMN topic, a Warning dialog box will display after you click OK. If you need the authorization, click OK to authorize OMS. Otherwise, click Cancel to return to the Select SMN Topic page and select another SMN topic.
- Configure Trigger Condition. You can select one of the following options or both:
- Migration succeeded: An SMN message will be sent after the migration task succeeds.
- Migration failed: An SMN message will be sent after the migration task fails.
NOTE:If you experience trouble in using SMN, see What Can I Do If the SMN Function Works Improperly?
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.
Perform the following steps to set traffic limits:
- Click Add Rule.
A traffic limiting rule is displayed.
- Specify Start Time, End Time, and Maximum Bandwidth.
The value range of the maximum bandwidth is 1 MB/s to 200 MB/s.
- Repeat 1 and 2 to add another traffic limiting rule.
You can click
in the Operation column to delete a rule.NOTE:You can create a maximum of five rules.
You can set traffic limiting rules in the task details even after the task is created.
- Click Add Rule.
Description
In the Description area, enter a maximum of 255 characters to briefly describe the migration task.
- Click Next to enter the confirmation page.
- Confirm the settings of the migration task and start the migration.
- Check whether the settings of migration parameters are correct.
If the settings are incorrect, click Previous to return to the previous page for modification.
- Click Migrate Now.
A message is displayed, indicating that the migration task is successfully created. The migration task is displayed in the migration task list.
For details about migration task statuses, see Viewing a Migration Task.
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.
- Check whether the settings of migration parameters are correct.
Last Article: Migration Tasks
Next Article: Viewing a Migration Task
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.