Cloud migration and data verification

更新时间:
复制 MD 格式

This topic describes how to return a Data Transport III device, migrate data to the cloud, and verify the migration results after you have transferred data to the device and powered it off.

Prerequisites

You have copied all required data to the Data Transport III device, stopped the migration task, and powered off the device.

Return the device

1. Verify task status

Run the following commands in sequence to confirm that the task status is succeed and that the CRC64 verification of the source files has passed.

  • Run cdmgwclient to enter the cdmgwclient directory.

  • Run bash console.sh status <job_name> to view the task status. Replace <job_name> with the actual task name.

2. Stop migration service

Important

You must perform the following operation after the migration is complete. Failure to do so may result in incomplete data migration. Do not force a power-off.

Run the following command to stop the migration service.

  • beforepoweroff

3. Unmount and lock the storage pool

Run the following command to unmount and lock the storage pool.

  • crypt close

4. Power off the device

Run the poweroff command to power off the device.

5. Check accessories

  1. Confirm that all four optical modules are present on the 25G optical port.

  2. Confirm that both power cords are included.

  3. Provide the Data Transport III device to an Alibaba Cloud logistics partner.

Cloud migration and result verification

RAM role authorization

Alibaba Cloud uses a specific RAM role to upload data from the Data Transport III device to your specified OSS bucket. You must grant the required permissions to this RAM role. Follow these steps:

Important

When you use a bucket policy to grant permissions, the new policy overwrites any existing policy. Ensure that the new policy includes the content of the existing policy. Otherwise, operations related to the existing policy may fail.

  • Log on to the OSS console.

  • In the left-side navigation pane, click Buckets and select the destination bucket.

  • In the left-side navigation pane, choose Permission Control > Bucket Policy.

  • In Add by Syntax, add a custom bucket policy, then click Edit and Save.

    • Grant the RAM role permissions to list, read, delete, and write all resources in the bucket.

Note

The following policy is for reference only. Replace the parameters with your actual values. When you replace parameters, do not include the angle brackets (<>). The parameters are described as follows:

  • <mybucket>: The name of your destination bucket.

  • <myuid>: The Alibaba Cloud account UID that owns the destination bucket.

Replace only the preceding parameters. The example already includes the specific RAM role information for Data Transport (UID: 1737441177608761; RAM role name: mgw-data-transport-role). For more information about OSS permission policies, see Common examples of RAM policies.

{
  "Version": "1",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "oss:List*",
        "oss:Get*",
        "oss:Put*",
        "oss:AbortMultipartUpload"
      ],
      "Principal": [
         "arn:sts::1737441177608761:assumed-role/mgw-data-transport-role/*"
      ],
      "Resource": [
        "acs:oss:*:<myuid>:<mybucket>",
        "acs:oss:*:<myuid>:<mybucket>/*"
      ]
    }
  ]
}

Cloud migration

Alibaba Cloud personnel will use the authorized RAM role to upload the data from the Data Transport III device to the cloud. After the cloud migration is complete, you will receive a data migration report to verify the results. This action completes the migration task.

Important

After the migration is complete, the generated data migration report is stored in your specified OSS bucket. For more information, see the Data migration report section.

Migration report

The generated data migration report is stored in your specified OSS bucket at the following paths:

OSS://<bucket>/<prefix>/aliyun_import_report/<uid>/<jobid>/<runtimeid>/total_list/
OSS://<bucket>/<prefix>/aliyun_import_report/<uid>/<jobid>/<runtimeid>/failed_list/
OSS://<bucket>/<prefix>/aliyun_import_report/<uid>/<jobid>/<runtimeid>/skipped_list/

Parameter

Description

bucket

Your specified OSS bucket.

prefix

The prefix of the migration directory that you specified in the destination OSS bucket.

uid

The UID provided by Alibaba Cloud personnel: 1737441177608761.

jobid

The job ID provided by Alibaba Cloud personnel.

runtimeid

The task execution record ID provided by Alibaba Cloud personnel.

The data migration report consists of three types of file lists: a list of all migrated files, a list of failed files, and a list of skipped files. You can download these files to view the details. We recommend using ossbrowser 2.0 (Preview) or ossutil 1.0.

Note

Naming conventions for data migration report files

  • A file named uid@jobid@runtimeid_total_list_n lists all migrated files. Multiple such files may exist, where n is an integer greater than or equal to 0.

  • A file named uid@jobid@runtimeid_failed_list_n lists the files that failed to migrate. Multiple such files may exist, where n is an integer greater than or equal to 0.

  • A file named uid@jobid@runtimeid_skipped_list_n lists the files that were skipped during migration. Multiple such files may exist, where n is an integer greater than or equal to 0.

The report files contain the following fields, which describe file attributes from the migration:

Parameter

Description

srcObjectName

The name of the source file.

destObjectName

The name of the destination file.

srcObjectSize

The size of the source file.

destObjectSize

The size of the destination file.

srcContentMd5

The MD5 hash of the source file, used for consistency verification.

destContentMd5

The MD5 hash of the destination file, used for consistency verification.

srcCrc64

The CRC64 value of the source file, used for consistency verification.

destCrc64

The CRC64 value of the destination file, used for consistency verification.

srcLastModified

The last modified time of the source file.

destLastModified

The last modified time of the destination file.

srcVersionId (only for migrations with versioning)

This field is empty.

destVersionId (only for migrations with versioning)

This field is empty.

startTime

The time when the file migration started.

endTime

The time when the file migration ended.

isAbnormal (false: normal, true: abnormal)

true indicates that an abnormality occurred during the file migration; false indicates a normal migration.

detailMsg

A description of the issue if the migration was abnormal.

Result verification

Data Transport III is responsible only for data migration and does not guarantee data consistency or integrity. After the migration task is complete, you must fully verify the migrated data to ensure consistency between the source and destination. After verification is complete, promptly revoke the permissions that you granted to the specific RAM role for Data Transport.

Warning

You must verify the data at the destination after the migration is complete. If you delete the source data before verifying that the destination data is correct and complete, you are solely responsible for any resulting data loss or other consequences.