Creating a Migration Task
Object storage migration is developed based on public computing resources. It helps you migrate object storage data from other cloud vendors to Huawei Cloud OBS online. If a source bucket contains no more than 3 TB of data or no more than 5 million objects, you can create a migration task to quickly migrate the data.
This section uses Huawei Cloud as the example source cloud. For details about how to create a migration task for other cloud vendors, see Migration from Other Clouds to Huawei Cloud.
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
Constraints
- Fewer than 1,000,000 migration tasks have been created in your account in the past 24 hours.
- There are fewer than 1,000,000 migration tasks in the Waiting state in your account.
For more constraints on object storage migration tasks, see Notes and Constraints.
Precautions
- OMS makes API calls to the object storage services on source platforms during the migration. These API calls may generate costs on those platforms and you will be responsible for those costs based on those source platform billing structures.
- By default, if a task stays in the waiting state for more than 30 days, OMS automatically puts the task into the 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.
- 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.
Procedure
Table 1 introduces the complete process of creating an object storage migration task.
| Step | Description |
|---|---|
| |
| Estimate how long the migration will take based on how many files and how much data you are going to migrate. This helps you better plan the migration and ensures that your services are not affected during the migration. | |
| Select the source and destination locations and set the parameters. | |
| Set migration task parameters and create a migration task. | |
| Confirm the information specified for configuring the migration task. Start the migration task and check its resource status and migration stages. |
Preparations
Before creating an object storage migration task, prepare the account, permissions, and destination OBS bucket based on Table 2.
| Item | Requirement |
|---|---|
| Registering a Huawei Cloud account with required permissions |
|
| Creating a destination bucket | Create a destination bucket in advance to receive data from the source. For details, see Creating a Bucket. |
Step 1: Performing Pre-Migration Evaluation
- Log in to the OMS console.
- Click
in the upper left corner and select a region from the drop-down list. - On the Migration Tasks page, click Create Migration Task in the upper right corner.
- Read the service disclaimer, select I have read and agree to the service disclaimer, and click OK. The Create Migration Task page is displayed.
- 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 to be migrated, 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.
Step 2: Setting Source and Destination Parameters
- Set the source parameters based on Table 3.
Table 3 Source parameters Parameter
Description
Data Source
Select the source cloud service provider.
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 form a pair. It can contain a maximum of 100 characters.
KMS Key
Disabled: The source key is not encrypted.
Enabled: The source key is encrypted.
Before enabling this function, authorize OMS to access KMS. After that, a custom policy is granted, which contains:
- kms:cmk:get: Query key information.
- kms:dek:decrypt: Decrypt a data key.
- kms:dek:create: Create a DEK without plaintext.
If you have the permission to grant access, grant KMS access permissions directly. After KMS access permissions are granted, follow-up operations do not require the permissions to be granted again. Then, you can perform the following operations:
Select a custom key from the drop-down list. Alternatively, create one by referring to Creating a Custom Key. Currently, only the AES_256 and SM4 key algorithms are supported.
NOTE:Enabling KMS encryption will incur fees. For details, see Pricing Details.
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 4.
Table 4 Description of Specify Source Bucket Parameter
Description
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 include the bucket name. OMS will check whether the source platform can be connected using the information you provided. If the source platform can be connected, the system will notify you.
Disable Specify Source Bucket (This feature is disabled by default.)
Click the Bucket drop-down list or the refresh icon and select the bucket where data needs to be migrated.
OMS will check whether the source platform can be connected using the information you provided. Once the source platform is connected, as long as your account has the necessary permissions to list buckets, all buckets in your account will appear in the Bucket drop-down list.
NOTE:If the source account does not have the permissions required to list buckets, enable Specify Source Bucket.
- Configure destination parameters based on Table 5.
Table 5 Destination parameters Parameter
Description
Access Key ID
AK of Huawei Cloud. It can contain a maximum of 100 characters.
Secret Access Key
SK of Huawei Cloud. The SK matches the AK. It can contain a maximum of 100 characters.
KMS Key
Disabled: The destination key is not encrypted.
Enabled: The destination key is encrypted.
Before enabling this function, authorize OMS to access KMS. After that, a custom policy is granted, which contains:
- kms:cmk:get: Query key information.
- kms:dek:decrypt: Decrypt a data key.
- kms:dek:create: Create a DEK without plaintext.
If you have the permission to grant access, grant KMS access permissions directly. After KMS access permissions are granted, follow-up operations do not require the permissions to be granted again. Then, you can perform the following operations:
Select a key from the KMS key drop-down list. Alternatively, create one by referring to Creating a Custom Key. Currently, only the AES_256 and SM4 key algorithms are supported.
NOTE:Enabling KMS encryption will incur fees. For details, see Pricing Details.
Bucket
Click the Bucket drop-down list or click Refresh and select the OBS bucket for storing the migrated data. The bucket must be located in the region where you are using OMS.
- Click Next. The Set Task Parameters page is displayed.
Step 3: Setting Task Parameters
- Set parameters in the Source Configuration area based on Table 6.
Table 6 Source parameters Parameter
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 remove a selected file or folder from the list. NOTE:- 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 a file and store the file in an OBS bucket on Huawei Cloud. OMS will migrate all objects specified in the file.
- Under List Bucket (Huawei Cloud), select the bucket where the object list is stored. The listed buckets are obtained using the destination AK/SK pair you provided. The bucket used to store the list files must be in the same region as the destination bucket, or you cannot select these files.
- Under Object List, click Select. Then select the folder where the object lists are stored and click OK. NOTE:
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 remove a name or prefix you added from the list. If no object names or prefixes are specified, all objects in the source bucket will be migrated.NOTE:If the files to be migrated are stored in the root directory of the source bucket, add their prefixes directly. If the files are stored in a non-root directory, add their directories and their prefixes in the format of Folder name/Prefix.
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.
- Under List Bucket (Huawei Cloud), select the bucket where the object list is stored. The listed buckets are obtained using the destination AK/SK pair you provided. The bucket used to store the list files must be in the same region as the destination bucket, or you cannot select these files. NOTE:
- 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:
- Configure parameters in the Destination Configuration area.
- Specify Prefix
- If you choose to disable this feature, the names of objects remain unchanged after the migration.
- If you choose to enable this feature, you can specify a prefix to rename or redefine the paths for objects migrated to the destination bucket, as shown in Figure 1.
- Object Storage Class
Choose the storage class that your objects will be migrated to. If you select the default configuration, the storage class of the destination bucket will be used. For details about storage classes, see How Do I Choose Storage Classes?
- Specify Prefix
- (Optional) Click
before Advanced Options to expand the advanced options. Set the parameters based on Table 7. Table 7 Advanced options Parameter
Description
Object Metadata
Determine whether to migrate metadata.
- If you select Do not migrate, OMS will only migrate the Content-Type and Content-Encoding metadata to ensure that the migration runs properly.
- If you select Migrate, OMS will migrate supported metadata. Only Chinese characters, English letters, digits, and hyphens (-) can be migrated. Other characters cannot be migrated.
The following metadata types are supported: Content-Type, Content-Encoding, Content-Disposition, Content-Language, Cache-Control, Expires, WebsiteRedirectLocation, Storage-Class, and custom metadata.
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.
Failed Object Record
Determine whether to record the objects that fail to be migrated.
- If you 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 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 each migration task, whether or not it belongs to a task group, the objects that fail to be migrated are recorded in a list named after the task name. This list is then uploaded to the oms/failed_object_lists/ directory in the destination bucket.
- A maximum of 100,000 failed objects can be recorded in a list file. If more than 100,000 objects fail to be migrated in a 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 enable this option if your source cloud service provider supports automatic restoration of archived data. This function is applicable to the following clouds: Huawei Cloud (COLD), Alibaba Cloud (Archive), Kingsoft Cloud (ARCHIVE), Tencent Cloud (ARCHIVE), and UCloud (ARCHIVE).
- If you do not enable this option, the system directly records archived objects in the list of objects that fail to be migrated, skips them, and continues to migrate other objects in the migration task.
- If you enable this option, the system automatically restores and migrates archived objects in the migration task. If an archived 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. NOTE:
- 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 cause all archived data to be restored again, even if it was already restored. This operation will take additional time and generate extra costs.
- After objects are migrated from the source platform to Huawei Cloud, they are in the same storage class as the destination bucket.
SMN Notification
Determine whether to use SMN to get notifications about migration results.- If you do not enable this option, no SMN messages will be sent after the migration is complete.
- If you enable this option, SMN messages will be sent after the migration is complete. Enabling this option means you agree to authorize OMS to publish messages to the selected topic through an agency (SMN FullAccess). You can delete the authorization at any time.
Then, perform the following steps:
- Click Add next to the SMN Topic box.
- Select a topic for publishing SMN messages and click OK.
- Click Add next to the SMN Template box. 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: A success notification will be sent via SMN if the migration task succeeds.
- Migration failed: A failure notification will be sent via SMN 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 Limit
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. For example, if you set the start time to 08:00, end time to 12:00, and the maximum bandwidth to 20 MB/s, the maximum migration speed is limited to 20 MB/s from 08:00 to 12:00. The migration speed is not limited beyond this period.NOTE:
- The maximum bandwidth ranges from 1 MB/s to 200 MB/s.
- When creating multiple rate limiting rules, ensure that the time periods do not overlap.
For example, if there is a rule configured for the period from 8:00 to 12:00, you cannot configure rules for any overlapped periods, such as from 7:00 to 13:00, 7:00 to 8:00, and 9:00 to 12:00.
- Start and end times must be on the same day, with the start time preceding the end time.
For example, the time period from 23:00 to 01:00 on the following day is not allowed.
- A maximum of five rules can be added for a migration task group.
- The time is the local standard time of the region you are migrating to.
Object Overwrite
- Overwrite if source newer or different size: This is the default setting. If a source object has the same name as the paired destination object, the system compares the sizes and last modification time of the source and destination objects to determine whether to overwrite the destination object. The encryption status of the source and destination objects must be the same. If a source object was last modified more recently than or is not as large as its paired destination object, the source object will overwrite the destination object. Otherwise, the source object will be skipped.
- Never overwrite: The system always skips source objects and keeps their paired destination objects.
- Overwrite if different CRC64 checksum: This option is only available for migration within Huawei Cloud or from Alibaba Cloud or Tencent Cloud. 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 one of them does not have a CRC64 checksum, their sizes and last modification times are checked.
- Always overwrite: The system always allows source objects to overwrite their paired destination objects.
Consistency Check
- By size and last modification time: This is the default setting. The system checks object consistency with object size and last-modification time. If a source object and its paired destination object have the same size and the destination object's last-modification time is not earlier than the source object's, the system considers the object unnecessary to migrate or already successfully migrated.
- By CRC64 checksum: This option is only available for migration within Huawei Cloud or from Alibaba Cloud or Tencent Cloud. If a source object and its paired destination object have CRC64 checksums, the checksums are checked. Otherwise, their sizes and last modification times are checked.
- Not required: This option is only available for migration of HTTP/HTTPS data. This option takes effect for source objects whose sizes cannot be obtained using the Content-Length field in the standard HTTP protocol. These source objects will overwrite their paired destination objects directly. If the size of a source object can be obtained, its size and last modification time will be 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
Enter a brief description about the migration task. A maximum of 255 characters is allowed.
Step 4: Confirming and Tracking the Migration Task
- Click Next in the lower right corner of the page. The confirmation page is displayed.
- 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 Migrate Now. Read the prompted information. After you confirm, click OK.
The migration task is displayed in the migration task list.
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 formed by concatenating the source bucket name, the destination bucket name, and a time series identifier.
- Check that the migration settings are correct.
- Click the task name to go to the task details page. You can see the number of migrated objects, total number of objects, task progress, migration speed, source and destination information, and migration task settings. For other operations of a migration task, see:
- Traffic limiting: Configuring Traffic Limiting Rules
- Migration records: Viewing Migration Records
Helpful Links
- APIs are provided for you to manage migration tasks. You can also customize APIs for performing desired operations, for example, create synchronization tasks periodically by referring to Creating a Synchronization Task.
- What Do I Do If a Migration Task Fails?
- What Can I Do If the Bucket Region Is Inconsistent with the Console Region When I Create a Migration Task?
What is your overall rating for this page?
Thank 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
