Creating a Migration Task
Scenario
If there is less than 3 TB of data or less than 5 million objects in a source bucket, you can 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, you can create a migration task group to migrate the source data quickly.
- By default, if a task stays in a waiting state for more than 30 days, OMS automatically puts the task into a Failed state and clears the AK/SK pair used by the task. To prevent task failures caused by blocking, do not create tasks too frequently.
- If an object is larger than 500 GB, migrating it takes a long time. You can submit a service ticket to whitelist the object for migration in segments.
- During the migration, the system automatically creates a temporary folder named OMS in the destination bucket. Do not perform any operations on this folder, including but not limited to modifying, deleting, or adding data in the folder. Otherwise, the migration will be interrupted or fail.
Background
OMS supports the following migration sources:
- Huawei Cloud
- AWS
- Alibaba Cloud
- Microsoft Azure
- Tencent Cloud
- Google Cloud
- Qiniu Cloud
- QingCloud
- Baidu Cloud
- Kingsoft Cloud
- UCloud
- HTTP/HTTPS data sources
- This section uses Huawei Cloud as the migration source. For tutorials for other cloud platforms, see Migration from Other Clouds to Huawei Cloud.
- OMS makes API calls to the object storage services on source platforms during the migration. These API calls may generate fees on those platforms, and you will be responsible for those fees based on those source platform billing structures.
Prerequisites
- You have registered a HUAWEI ID and enabled Huawei Cloud services.
- You have obtained the AK/SK pairs and required permissions for the source and destination platform accounts.
- The source platform account needs the permissions for:
- Listing buckets
- Obtaining bucket locations
- 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 buckets
- Obtaining bucket locations
- Listing objects
- Obtaining object metadata
- Obtaining object content
- Listing uploaded parts
- Restoring archived objects
For details about how to obtain these permissions, see Destination Permissions.
- The source platform account needs the permissions for:
- You have created a bucket in OBS.
- You have created less than 1,000,000 migration tasks within the past 24 hours.
- You have less than 1,000,000 migration tasks in Waiting state.
Procedure
- Sign in to the console.
- Click in the upper left corner and select the desired region.
- Click Service List. Under Migration, click Object Storage Migration Service.
The OMS page is displayed.
- On the Overview page, click Create Migration Task.
Read the service disclaimer, select I have read and agree to the service disclaimer, and click OK.
- Determine whether to enable pre-migration evaluation.
- If you disable it, pre-migration evaluation will not be performed.
- If you enable it, specify the number of files, the amount of data to be migrated, and the desired migration duration. Then click Start Evaluation. After the evaluation is complete, the pre-migration evaluation result is displayed under Start Evaluation.
- On the Select Source/Destination page, perform the following operations:
- Configure source parameters. For details, see Table 1.
Table 1 Source parameters Parameter
Description
Data Source
Select the source cloud service provider.
(Optional) APPID
Enter the identifier of your account for logging in to the Tencent Cloud console. This parameter is only available if the source cloud service provider is Tencent Cloud.
Access Key ID
Enter the AK for accessing the source platform. It can contain a maximum of 100 characters.
Secret Access Key
Enter the SK for accessing the source platform. The SK matches the AK, and they group into a pair. It can contain a maximum of 100 characters.
Specify Source Bucket
Enable this option if your source account does not have the permissions required to list buckets but has the permissions to list objects in buckets, obtain object metadata, and obtain object content. Then specify the bucket or path to be migrated.
For details, see Table 2.
Table 2 Description of Specify Source Bucket If You...
Then...
Enable Specify Source Bucket
- Select the region where the source bucket is located from the Region drop-down list.
- In the Bucket text box, enter the bucket or the path to be migrated. The path must have the bucket name included.
- Click Connect.
NOTE:
OMS will check whether the source bucket can be connected and will prompt you if the bucket is connected.
Disable Specify Source Bucket (This feature is disabled by default.)
- 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 entered. Once the source platform is connected, all buckets in your account will be listed in the Bucket drop-down list, provided your account has the necessary permissions to list buckets.
NOTE:If the source platform account does not have the permissions required to list buckets, you need to enable Specify Source Bucket.
- Select the destination platform. For details about the parameters, see Table 3.
Table 3 Destination platform parameters Parameter
Description
Access Key ID
Enter the AK for accessing Huawei Cloud. It can contain a maximum of 100 characters.
Secret Access Key
Enter the SK for accessing Huawei Cloud. The SK matches the AK, and they group into a pair. It can contain a maximum of 100 characters.
After entering the AK and SK, click List Buckets.
Bucket
Select a destination OBS bucket for storing the migrated data.
- Configure source parameters. For details, see Table 1.
- Click Next.
- Configure parameters in the Source Configuration area.
- Select a migration method.
If You Select...
Then...
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 remove a selected file or folder from the list.NOTE:- Migration method File/Folder is not available for migration from Qiniu Cloud.
- 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 method is used for incremental migration. 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 will migrate all objects specified in the object list file.
NOTE:- An object list file cannot exceed 1,024 MB.
- The first object in the object list must exist, or the pre-verification will fail.
- The object list file must be a .txt file, and the ContentType 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 if it contains special characters or spaces.
- 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.
- Each line in the object list file cannot be longer than 65,535 characters, or the migration will fail.
- The ContentEncoding metadata of each object list file must be left empty, or the migration will fail.
- Archived data can only be accessed and obtained by OMS after it is restored. If the object list file is archived, manually restore it before migration.
- Select the bucket where the object list file is stored.
NOTE:
The listed buckets are obtained using the destination AK/SK pair you entered in 6.b.
The bucket used for storing the list file must be located in the same region as the destination bucket, or you cannot select the file.
- Click Select next to Object List, select the object list file, and click OK.
Object name prefix
Enter the names or prefixes of objects to be migrated and click Add. OMS will automatically list the matched objects. You can click to remove a name or prefix you added from the list.
NOTE:- If the objects you want to migrate are stored in the root directory of the source bucket, add their prefixes directly. If the objects are stored in none-root directories, add their directories and prefixes in the format of Bucket name/Folder name/Prefix.
- If no object names or prefixes are specified, all objects in the source bucket will be migrated.
URL list
Generally, this method is used to migrate HTTP/HTTPS 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 will migrate all files specified in the URL list file.
- Select the bucket where the list file is located.
NOTE:
- The listed buckets are obtained using the destination AK/SK pair you entered in 6.b.
- The bucket used for storing the list file must be located in the same region as the destination bucket, or you cannot select the file.
- For security purposes, if the migration source supports both HTTP and HTTPS, you are advised to use HTTPS for 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 not 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 URL List, select the URL list file, and click OK.
NOTE:
- A URL list file cannot exceed 1,024 MB.
- The URL list file must be a .txt file, and its metadata Content-Type 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 name.
- Each line in the URL list file cannot be longer than 65,535 characters, or the migration will fail.
- The ContentEncoding metadata of the URL list file must be left empty, or the migration will fail.
- The format of the first line in the URL list file must be correct, or the pre-verification will fail.
- In the URL list file, you must use a tab character (\t) to separate the URL and destination object name in each line. The format is [URL][Tab character][Destination object name]. Chinese and special characters in the source and destination object names must be URL encoded.
Please note that:
The URL encoding must start from the second character after the domain name in a line. Do not encode the protocol header, domain name, or slash before or after the domain name. Otherwise, the format verification will fail.
In each line, use a tab character (Tab key on the keyboard) to separate the URL and the destination object name. Do not use spaces.
For example:http://xxx.xxx.xxx.xxx.com/doc/thefile2.txt doc/thefile2.txt http://xxx.xxx.xxx.xxx.com/the%20file.txt the%20file.txt http://xxx.xxx.xxx.xxx.com/the%20file2.txt the+file2.txt http://xxx.xxx.xxx.xxx.com/doc/thefile.txt doc/thefile.txt
In the preceding examples, after the files represented by the URLs are copied to the destination bucket, the objects are named 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.
- URLs in the list file can be accessed using HEAD and GET methods.
- Select a migration method.
- Configure parameters in the Destination Configuration area.
- Specify Prefix
- If you choose to disable this feature, the names of objects remain unchanged before and after the migration.
- If choose to enable this feature, you can specify a prefix to rename or redefine the paths for objects migrated to the destination bucket.
Figure 1 Entering a prefix
To learn how to use Specify Prefix, see Adding a Name Prefix or Path Prefix to Migrated Objects.
- Object Storage Class
Choose the storage class that your data will be migrated to. For details about storage classes, see Storage Classes.
- Specify Prefix
- (Optional) Click before Advanced Settings to expand the advanced options. Configure advanced options by referring to Table 4.
Table 4 Advanced settings Parameter
Configuration
Object Metadata
Determine whether to migrate metadata.
- If you select Do not migrate, OMS will only migrate the Content-Type and Content-Encoding metadata.
- If you select Migrate, OMS will migrate supported metadata.
NOTICE:
- Only Chinese characters, English characters, digits, and hyphens (-) can be migrated. Other characters cannot be migrated.
- Even if you choose not to migrate metadata, the Content-Type and Content-Encoding metadata will still be migrated to ensure that the migration runs properly.
Selective Migration
Determine whether to filter source data to be migrated by time.
- If you do not need to filter source data by time, disable this option.
- If you need to filter source data by time, enable this option and specify a date and time. Then only source data modified after the specified date and time will be migrated.
Server-Side Encryption
Determine whether to enable server-side encryption.
- If you choose to disable this option, objects will not be encrypted before they are stored to the destination bucket.
- If you choose to enable this option, objects will be encrypted before they are stored to the destination bucket.
NOTE:- SSE-KMS is used by default. Other encryption methods or custom encryption is not supported.
- If the destination is a parallel file system (PFS), KMS encryption is not supported.
- Enabling KMS-based server-side encryption may slow down the migration speed by about 10%.
- KMS encryption is only available if KMS is supported in the region you are migrating to.
Failed Object Record
Determine whether to record the objects that fail to be migrated.
- If you choose to disable this option, 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 you choose to enable this option, the system will record the objects that fail to be migrated. If the migration fails and needs to be retried, you can choose to only migrate failed objects again.
NOTE:- For a migration task, no matter it is contained in a task group or not, the objects that fail to be migrated are recorded in a list named after the task name, and the list is uploaded to the oms/failed_object_lists/ directory of the destination bucket.
- A maximum of 100,000 failed objects can be recorded in the failed object list.
If more than 100,000 objects fail to be migrated in the migration task, you are advised to rectify the fault based on the existing failed object list and perform the migration again.
- This file contains information about the failed migration task, including the failure cause and time (in 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 retained in the destination bucket even after the objects in the file are successfully re-transferred. If you do not need the file, delete it manually.
Archive Data Restoration
Archived data must be restored before it can be migrated. You can choose to enable this option if your source cloud service provider supports automatic restoration of archived data.
- If you enable this option, the system automatically restores and migrates archived objects in the migration task. If an archive object fails to be restored, the system skips it and records it in the list of objects that failed to be migrated and continues to migrate other objects in the migration task.
NOTICE:
- The following cloud service providers can automatically restore archived objects: Huawei Cloud, Alibaba Cloud, Kingsoft Cloud, and Tencent Cloud.
- It takes at least a minute to restore an archived object. The larger the archived object is, the longer it takes to restore it, but if an archived object cannot be restored within three minutes, the restoration fails. The time needed depends on the cloud service provider. For details, see the documentation of your source cloud service provider.
- Two types of fees are generated during archived data restoration: fees for API calls and fees for archived object restoration. These fees are billed by the source cloud service provider.
- After the restoration is complete, archived 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, archived objects need to be restored again for migration. For details about how long they stay in the restored state, see the documentation of the cloud service provider.
- The copies generated for restoring archived objects will be stored for three days by default. If there is more than 3 TB of data or more than 3 million objects in a source bucket, create a migration task group to migrate data in case the migration fails because the restored data is archived again.
- Pausing or restarting a migration task will result in restoration of all archive data again, no matter it has been restored or not.
- After objects are migrated from the source platform to Huawei Cloud, they are in the same storage class as the destination bucket.
- If you do not enable this option, the system directly records archived objects in the list of objects that failed to be migrated, skips them, and continues to migrate other objects in the migration task.
SMN Notification
Decide whether to use SMN to get notifications about migration results.- If you do not enable this option, no SMN message will be sent after the migration is complete.
- If you enable this option, you will receive an SMN message informing you of the migration results.
- Click Add next to the SMN Topic box. The Select SMN Topic dialog box is displayed.
- Select a topic for publishing SMN messages and click OK. If OMS is not authorized to publish messages to the selected SMN topic, a Warning dialog box will appear after you click OK. If you need to complete the authorization, click OK to authorize OMS. Otherwise, click Cancel to return to the Select SMN Topic page and select another SMN topic.
- Click Add next to the SMN Template box. The Select SMN Template dialog box is displayed. If this parameter is specified, SMN messages will be sent using the specified template. The template must use the default protocol.
- Select a template for publishing SMN messages and click OK.
- Configure Trigger Condition. You can select one of the following options or both:
- Migration succeeded: An SMN message will be sent if the migration task succeeds.
- Migration failed: An SMN message will be sent if the migration task fails.
NOTE:If you experience trouble in using SMN, see What Do I Do If SMN Does Not Work Properly?
Traffic Limiting
Set the maximum bandwidth for the migration task during different periods.
- If you do not need to limit the migration traffic, disable this option.
- If you need to limit the migration traffic, enable this option.
- Specify Start Time, End Time, and Maximum Bandwidth.
The maximum bandwidth ranges from 1 MB/s to 200 MB/s.
NOTICE:For example, if you set Start Time to 08:00, End Time to 12:00, and Maximum Bandwidth to 20 MB/s, the maximum migration speed is limited to 20 MB/s when the migration task runs in the period from 08:00 to 12:00. The migration speed is not limited beyond this period.
The time is the local standard time of the region you are migrating to.
- Click Add Rule. An empty traffic limiting rule is displayed.
- Repeat 1 and 2 to add another traffic limiting rule.
You can click Delete in the Operation column to delete a rule.
NOTE:A maximum of five rules can be added for a migration task.
You can set traffic limiting rules in the task details even after the task is created.
- Specify Start Time, End Time, and Maximum Bandwidth.
Object Overwrite
- Overwrite if source newer or different size: If a source object is not as large as or was last modified more recently than its paired destination object, the source object will overwrite the destination object. Otherwise, the source object will be skipped.
- Never overwrite: The system will always skip source objects and keeps their paired destination objects.
- Overwrite if different CRC64 checksum: If a source object has a CRC64 checksum different from the paired destination object, the source object will overwrite the destination object. Otherwise, the source object will be skipped. If either of them does not have a CRC64 checksum, their sizes and last modification times are checked.
NOTE:
- This option is only available for migration on Huawei Cloud or from Alibaba Cloud or Tencent Cloud.
- This option is applied only when the source object has a same encryption attribute as the destination one.
- Always overwrite: The system always allows source objects to overwrite their paired destination objects.
Consistency Check
- By size and last modification time: With this default setting, the system will check object consistency with object size and last modification time.
- By CRC64 checksum: The system will check object consistency with CRC64 checksums. If a source object and the paired destination object have CRC64 checksums, the checksums are checked. Otherwise, their sizes and last modification times are checked.
Priority
If there are a large number of tasks, you can set task priorities to control which tasks take precedence over other tasks.
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 migration settings and start the migration.
- Check that the migration settings are correct.
If the settings are incorrect, click Previous to return to the previous page for modification.
- Click Next. 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 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 that the migration settings are correct.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot