Scenarios
The following context will provide a detailed introduction on how to configure a fully managed migration task and a semi-managed migration task to achieve data migration when the source Cloud Object Storage (COS) is deployed in Azure Blob.
Preparations
Azure Blob Storage
1. You can click storage account in the Azure console and then select the storage account pending migration.
2. Click access key in the left sidebar of the storage account webpage pending migration to view the key and concatenated string.
Note:
The above procedure may vary due to updates to the origin server. Please refer to the Azure official documentation for the latest information.
Tencent Cloud Object Storage COS
1. Create a destination bucket to store the migrated data. For details, see create a bucket. 2. Create a Sub-user for migration and grant relevant permissions:
2.2 In the left sidebar, select Users > User List to access the user list page.
2.3 Create a Sub-user, select Programming access and Visit Tencent Cloud Console.
2.4 Search and select the QcloudMSPFullAccess and QcloudCOSAccessForMSPRole policies.
2.5 Complete the sub-user creation and save the Username, access login password, SecretId, and SecretKey.
Note:
Cloud migration can also be performed using the main account. However, for security reasons, it is recommended to create a sub-account and use the sub-account API key for migration. Delete it after migration.
Operation Steps
Logging in to Cloud Migration
2. Click in the left sidebar COS migration to enter the COS migration webpage.
Create a migration task.
1. On the COS migration webpage, click Create Task to enter the COS migration task configuration page and set up migration parameters.
2. Set migration task name.
Task name: The character length ranges from 1 to 60 characters. Allowed characters include Chinese, English, 0-9, _, and -. The name set here will be used to view the migration status and migration progress in the task list.
3. Estimate task size. Accurately fill in the task size so that we can better prepare relevant resources. Optional.
4. Set the file source to migrate.
Service Provider: The migration source service provider should be AZURE.
Storage Account, Key: Enter the storage account and key applicable to migration in the key text box.
Note:
Migrate files from Azure Blob to COS. SAS (Shared Access Signature) cannot be used for identity authentication.
Container: Enter the name of the container to be migrated and the concatenated string. If the concatenated string is not input, it defaults to core.windows.net.
Header migration mode: If files in the source bucket have Headers/Tags set and need to be reserved after migration, select to retain or set replacement rules.
File name filtering rules: Select to migrate all files in the specified bucket or only files with a specified prefix.
Time range: Set the start time range to only migrate files that are newly added or changed within a specified time period.
Execution Speed, Speed Limit Mode: Object storage from public cloud vendors has speed limits. To underwrite business stability, please confirm with the source vendor and set the max available migration Mbps before migration.
5. Select the target location to migrate to.
Service Provider: Defaults to Tencent Cloud COS.
SecretId, SecretKey: Manually input the Tencent Cloud sub-user SecretId and SecretKey for migration.
Bucket name: After filling in the key, click the refresh button on the right of the "Bucket Name" drop-down list to obtain the target COS bucket list.
Storage Path: Specify the directory in the target bucket for migration.
Save to the root directory: Directly save files in the source bucket to the root directory of the target bucket with their original relative paths.
Save to the specified directory: Keep the original relative paths of files in the source bucket and save them to the specified directory.
For example: the files /a.txt and /dir/b.txt in the source bucket. Fill "dest" in the text box, so after migration, the paths of these two files in the target bucket will be: /dest/a.txt and /dest/dir/b.txt.
If dest/20180901 is filled in the text box, then after migration, the paths of these two files in the target bucket will be: /dest/20180901/a.txt and /dest/20180901/dir/b.txt.
File with the same name: Specify the processing method for files with the same name.
Note:
If a file with the same name selects overwrite, it will directly overwrite the file with the same name during migration.
If a file with the same name selects skip, it will be judged based on the last modified time LastModified.
If the LastModified of the file in the source address is later than or equal to that in the destination address, then execute overwrite.
If the LastModified of the file in the source address is earlier than that in the destination address, then skip.
If the content of an object (file) changes during the migration process, secondary migration is needed.
Storage type: Based on migration needs, set the storage method for files after migration. You can choose: standard storage, infrequent storage, retain original storage attributes, or archive storage.
6. Select migration mode.
Mode Selection:
Create a migration task and start fully-managed migration immediately: Select managed migration. After the user clicks Create and start, the cloud migration service will access the source storage via public network to migrate.
Create a migration task and download the Agent manually to start migration: Select Agent Mode Migration. After the user clicks Create and Start, only the task configuration will be created. Users are advised to manually download the Agent and deploy it on the migration source server before migration officially starts. For Agent Deployment, please refer to instructions for using semi-managed migration Agent. Scheduled Task: Starting a scheduled task allows repeated task execution and migrates incremental files from the source bucket. Except for the first task which is executed immediately, subsequent tasks will trigger re-run based on the schedule type set at fixed intervals or according to Cron settings. During re-run, "files with the same name" will change to "skip (retain existing files with the same name in the destination bucket)", meaning only incremental files are synchronized.
Note:
For example, set the scheduled run count to 3, repeat every hour, start the first task at 13:00, and execute the second task at 14:00 (if the first task is not completed at this point, wait until it finishes before rerunning the second task, and so on, until all 3 tasks are completed).
7. Click Create and start to initiate the migration task.
Viewing Migration Status and Progress
In the COS migration interface, you can view the status and progress of ALL file migration tasks.
"Task completed" status: Green indicates the task is completed and all files are successfully migrated, yellow indicates migration task completion but partial files failed to migrate.
Click Retry Failed Task to retry migration for failed files in the task. Files that have already been successfully migrated will not be retransmitted.
Click Export can export the file list of failed items during the migration process.
How to Estimate File Migration Time
Migration speed is determined by the lowest speed in each step of the migration process, subject to the impact of network transmission speed and maximum concurrency number. For details, see estimate file migration time.