All Products
Search
Document Center

Server Migration Center:Migrate data from a lightweight server provided by a third party to an Alibaba Cloud simple application server

Last Updated:Oct 11, 2024

If you want to migrate data from a lightweight server provided by a third party cloud vendor, such as a Tencent Cloud Lighthouse, Huawei Cloud Hyper Elastic Cloud Server (HECS), or AWS Lightsail instance, to an Alibaba Cloud simple application server, you can use Server Migration Center (SMC) to quickly complete the migration.

Note
  • Alibaba Cloud Simple Application Server is a lightweight cloud server that is easy to set up and manage. It provides services such as application deployment, security management, and O&M monitoring based on a single server to improve your experience and efficiency in server usage. For more information, see What is Simple Application Server?

  • If Alibaba Cloud Simple Application Server cannot meet your business requirements, we recommend that you migrate data from lightweight servers provided by third party cloud vendors to Alibaba Cloud Elastic Compute Service (ECS) instances to obtain more flexible resource configuration solutions. For more information, see Migrate a server to an ECS instance.

Limits

  • You cannot migrate data from Alibaba Cloud ECS instances to Alibaba Cloud simple application servers.

  • You cannot migrate data between simple application servers.

  • You cannot migrate data between a Windows server and a Linux server. You can migrate a Windows server only to a Windows server, and a Linux server only to a Linux server.

  • A maximum of one data disk can be attached to the source lightweight server.

Impacts

Before you migrate data, you must understand the impacts caused by migration, as shown in the following table.

Item

Description

Data directory

During server migration, SMC can obtain the partitioning scheme of a source disk used by the migration source and generate the same partitioning scheme for the destination disk. This accelerates data transmission during the migration.

Windows servers

By default, only the data on the C drive (including shared directories that are attached to the C drive) is migrated as a partition of the system disk. If you want to migrate data from other partitions such as the D drive, you must select and configure a data disk when you create a migration job.

Linux servers

  • If you do not enable the block replication feature, the data in all subdirectories, including shared subdirectories in the root directory, is migrated as a partition of the system disk. If you want to migrate data from other directories such as /disk1, to an independent data disk, you must select and configure the data disk when you create a migration job. For information about how to exclude unnecessary directories for the migration, see the How do I exclude files or directories from a migration job? section of the "FAQ" topic.

  • By default, if you enable the block replication feature, only the subdirectories in the root partition of the system disk, such as / and /boot, are migrated. If you want to migrate data from other partitions, you must select and configure a data disk when you create a migration job.

Intermediate instance

Do not perform operations on the intermediate instance during the migration.

To run a migration job, SMC creates a temporary intermediate instance named No_Delete_SMC_Transition_Instance within your Alibaba Cloud account. For more information, see the "What specifications are available for intermediate instances?" section of the FAQ topic. To prevent migration failures, do not stop, start, restart, or release the intermediate instance during the migration process. After the migration is complete, SMC automatically releases the intermediate instance.

Note

When you migrate a server to an ECS instance, the ECS instance serves as the intermediate instance.

IP address

After the migration, the IP address of your server is changed. If your business involves IP address configuration, change the IP address after the source server is migrated.

Note

If a domain name has been bound to the source server, the public IP address of the server is changed after the migration. In this case, you must resolve the domain name to the new public IP address of the server For more information, see Add an A record for a website domain name.

Underlying hardware

After the migration, the underlying hardware may change, and the application licenses that are associated with the underlying hardware may become invalid. Perform checks as needed.

Prerequisites

  • The preparations for server migration are complete. For more information, see Before you begin.

  • An Alibaba Cloud simple application server is created, and the storage system and operating system of the simple application server are compatible with the storage system and operating system of the migration source. For more information, see Create a simple application server.

    Warning

    After the migration is complete, the original data on the Alibaba Cloud simple application server is cleared. The data on the migration source is not affected. We recommend that you back up your data before you perform the migration if important data exists on the simple application server.

    • The operating system of the simple application server must be the same as the operating system of the migration source.

    • The number of data disks attached to the single application server must be greater than or equal to the number of data disks attached to the migration source. Otherwise, data on the migration source cannot be fully migrated to the simple application server. In this case, you must attach more data disks to the simple application server. However, a maximum of one data disk can be attached to a simple application server. For more information about how to attach a data disk, see Attach a data disk and Partition and format the data disk.

    • The size of the system disk and data disk attached to the simple application server is greater than or equal to the size of the system disk and data disk attached to the migration source. If you want to scale down the system disk and data disk attached to the migration source, make sure that the size of the system disk and data disk attached to the simple application server is greater than or equal to the size actually used by the data on the system disk and data disk attached to the migration source. Otherwise, data on the migration source cannot be fully migrated to the simple application server. In this case, you must scale up the system disk and data disk attached to the simple application server. For more information about how to scale up a disk, see Extend a data disk.

Procedure

Import the information about a migration source

Migration sources can be servers of a variety of types, such as servers in data centers, VMs, and hosts on third-party cloud platforms. SMC supports multiple methods to import the information about migration sources. You can select a method based on your business requirements. For more information, see the How do I select the method to import the information about a migration source? section of the "FAQ" topic.

(Recommend) Use the CLI

Important

The source server must be accessible over the Internet.

  1. Log on to the SMC console.

  2. In the left-side navigation pane, choose Migrate to Cloud > Server Migration.

  3. On the Server Migration page, click Import Migration source.

  4. Configure the parameters as prompted and copy the activation code command. The following table describes the parameters.

    Parameter

    Description

    Migration Source Type

    The type of the migration source. Select Physical Server/VM/ECS Instance.

    Import Method

    The method that is used to import the information about the migration source. Select Use CLI to Import Server.

    Migration Source Quota

    The number of migration sources whose information you want to import by using the activation code. Valid values: 1 to 1000. Default value: 10.

    Validity Period

    The validity period of the activation code. Unit: day. Valid values: 1 to 90. Default value: 30.

    Activation Code

    Generate the activation code and copy the generated command by performing the following steps:

    1. Click Generate.

    2. Click the Linux Shell or Windows Powershell tab based on the operating system of the source.

    3. Click Copy to copy the activation code command.

  5. Log on to the source server and paste and run the copied command as an administrator to import the information about the migration source.

    Linux server
    1. Log on to the Linux server.

    2. Paste and run the copied command as an administrator to import the information about the migration source.

      image.png

      After the command is run, if a message similar to Import Source Server [s-bp18x8751kgz2oyh****] Successfully! is returned, the information about the migration source is imported.

    Windows server
    1. Log on to the Windows server.

    2. Open Windows PowerShell as an administrator.

    3. Run the copied command to import the information about the migration source.

      image.png

      After the command is run, if a message similar to Import Source Server [s-bp19rlidl3mwuptc****] Successfully! is returned, the information about the migration source is imported.

  6. On the Server Migration page in the SMC console, view the status of the migration source in the Real-time Migration Status column.

    • If the status of the migration source is Online, the information about the migration source is imported.

    • If the migration source is in another state, the information fails to be imported. In this case, troubleshoot the failure based on the following solutions and import the information about the migration source again:

      • Troubleshoot the failure based on the message displayed in the SMC console or the log file in the directory where the SMC client is installed. By default, the SMC client is installed in the following directory:

        • Windows server: C:\smc

        • Linux server: /smc

      • Refer to the FAQ and Troubleshooting topics for troubleshooting.

Use the SMC console

Important
  • The source server must be accessible over the Internet.

  • If you want to import the information about a migration source as a Resource Access Management (RAM) user, make sure that the following permissions are granted to the RAM user:

  1. Log on to the SMC console.

  2. In the left-side navigation pane, choose Migrate to Cloud > Server Migration.

  3. On the Server Migration page, click Import Migration source.

  4. On the Import Migration source page, configure the parameters based on the type of your migration source.

    Parameter

    Description

    Migration Source Type

    The type of the migration source. Select Physical Server/VM/ECS Instance.

    Import Method

    The method that is used to import the information about the migration source. Select Import through Console.

    Migration Source Name

    The name of the migration source. The name must be 2 to 128 characters in length. The name must start with a letter but cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (_), and hyphens (-).

    OS Type

    The type of the operating system. Select Linux or Windows based on your operating system type.

    Important

    If you select Windows as the operating system, you must install OpenSSH. For more information, see the How do I install OpenSSH on a Windows server? section of the "FAQ" topic.

    IP Address

    The IPv4 address that is used to access the migration source over the Internet. Example: 120.55.XX.XX.

    Port

    The SSH port number of the migration source. Valid values: 1 to 65535. Default value: 22.

    Username

    The username that is used to log on to the operating system of the migration source.

    • Linux: The default username is root.

    • Windows: The default username is Administrator.

    Password

    The password corresponding to the username.

  5. After you configure the parameters, click Import.

    The import process takes about 3 to 10 minutes. Wait until the import is complete.

  6. On the Server Migration page in the SMC console, view the status of the migration source in the Real-time Migration Status column.

    • If the status of the migration source is Online, the information about the migration source is imported.

    • If the migration source is in another state, the information fails to be imported. In this case, troubleshoot the failure based on the following solutions and import the information about the migration source again:

      • Troubleshoot the failure based on the message displayed in the SMC console or the log file in the directory where the SMC client is installed. By default, the SMC client is installed in the following directory:

        • Windows server: C:\smc

        • Linux server: /smc

      • Refer to the FAQ and Troubleshooting topics for troubleshooting.

Use the SMC client

For more information about the SMC client, see Use the Windows GUI version of an SMC client.

  1. Log on to the SMC console.

  2. In the left-side navigation pane, choose Migrate to Cloud > Server Migration.

  3. On the Server Migration page, click Import Migration source.

  4. On the Import Migration Source page, configure the parameters. The following table describes the parameters.

    Parameter

    Description

    Migration Source Type

    The type of the migration source. Select Physical Server/VM/ECS Instance.

    Import Method

    The method that is used to import the information about the migration source. Select Use Client to Import Server.

    Description

    Read the information in the Description section and download the required version of the SMC client based on the CPU architecture (ARM or x86) and bit version (32-bit or 64-bit) of the operating system of the migration source.

  5. Import the information about the migration source.

    Perform the operations based on the operating system of the migration source.

    Important

    During the migration, do not shut down the SMC client until the migration is complete. Otherwise, the migration source is disconnected from the SMC console, and the migration fails.

    Windows server
    1. You can use a remote connection tool that supports file transfer. For example, you can use WinSCP to upload the SMC client package to the source Windows server.

    2. On the source Windows server, use the built-in decompression tool of Windows or the decompression tool that you install to decompress the SMC client package.

    3. In the SMC client folder that corresponds to the source server, run the SMC client.

      • To run the Windows GUI version, double-click the go2aliyun_gui.exe file.

      • To run the Windows CLI version, double-click the go2aliyun_client.exe file.

      Note

      When you run the program, you must click OK to confirm that you have the administrator permissions.

    4. Obtain an activation code or AccessKey pair.

      • (Recommend) Obtain an activation code: In the Description section in the SMC console, click Generate and copy the generated activation code information.

      • Obtain an AccessKey pair: An AccessKey pair consists of an AccessKey ID and an AccessKey secret. If no AccessKey pair is created, create one first. For more information, see Obtain an AccessKey pair.

    5. Enter the activation code or AccessKey pair as prompted.

      • To run the Windows GUI version, enter the activation code or AccessKey pair in the Token Id/AK and Token Code/SK fields and click Start. For more information, see Use the Windows GUI version of an SMC client.

      • To run the Windows CLI version, enter the obtained access_access_token_id and access_token_code and press the Enter key.

      If the information about the migration source is imported, a message similar to the following one is returned: Import Source Server [s-bp11npxndknsycqj****] Successfully!

    Linux server
    1. You can use a remote connection tool that supports file transfer. For example, you can use WinSCP to upload the SMC client package to the source Linux server.

    2. Connect to the source Linux server and decompress the SMC client package.

      Linux 64-bit Generic is used in the example. Run the following command to decompress the package. If you use another version of the SMC client, replace the package name in the command with the name of your SMC client.

      tar xf go2aliyun_client_linux_x86_64.tar.gz
      Note

      Linux ARM64 supports the g6r general-purpose instance family and the c6r compute-optimized instance family. For more information about instance types, see the "ARM-based enterprise-level computing instance families" section of the Overview of instance families topic.

    3. (Optional) Exclude the files or directories that you do not need from the migration. For more information, see the How do I exclude files or directories from a migration job? section of the "FAQ" topic.

      Important

      If you enable the block replication feature, you cannot exclude files or directories from the migration job.

    4. Obtain an activation code or AccessKey pair.

      • (Recommend) Obtain an activation code: In the Description section in the SMC console, click Generate and copy the generated activation code information.

      • Obtain an AccessKey pair: An AccessKey pair consists of an AccessKey ID and an AccessKey secret. If no AccessKey pair is created, create one first. For more information, see Obtain an AccessKey pair.

    5. In the SMC client folder, run the following commands to run the SMC client.

      Run the following commands as a root or sudo user based on whether you have root or sudo permissions on the operating system of the source server.

      Root user
      cd go2aliyun_client_linux_x86_64
      chmod +x go2aliyun_client
      ./go2aliyun_client
      Sudo user
      cd go2aliyun_client_linux_x86_64
      sudo chmod +x go2aliyun_client
      sudo ./go2aliyun_client
    6. Enter the activation code or AccessKey pair as prompted. In this example, an activation code is used, as shown in the following figure.adad

      The following messages may appear after you enter the activation code.

      • If no snapshot dependency is installed on your source server, a message appears. The following figure shows the details of the message. You can decide whether to install a snapshot dependency based on whether you enable the block replication feature.

        • If you want to enable block replication for the migration, enter yes to automatically install a snapshot dependency.

        • If you do not want to enable block replication for the migration, enter no.

        Important

        If the snapshot dependency fails to be installed, do not enable block replication when you create a migration job. Otherwise, the migration may fail.

        123

      • The rsync tool is installed on most mainstream migration sources. If rsync is not installed on the migration source, the SMC client displays a message. Enter yes to install rsync, as shown in the following figure.安装rsync

      • If SELinux is enabled on the migration source, a message that prompts you to disable SELinux appears. Enter yes to disable SELinux. The following figure shows how to disable SELinux.关闭SELinux

      If the information about the migration source is imported, a message similar to the following one is returned: Import Source Server [s-bp11npxndknsycqj****] Successfully!.

      Note

      If the information about the migration source fails to be imported, you can troubleshoot the issue based on the returned message. After you fix the issue, run the following commands to exit the background program and re-import the information about the migration source based on your permissions on the operating system of the migration source. For more information about frequently asked questions (FAQ) and solutions, see FAQ and Troubleshooting.

      Sudo user
      sudo ./go2aliyun_client --abort
      sudo ./go2aliyun_client
      Root user
      ./go2aliyun_client --abort
      ./go2aliyun_client
  6. On the Server Migration page in the SMC console, view the status of the migration source in the Real-time Migration Status column.

    • If the status of the migration source is Online, the information about the migration source is imported.

    • If the migration source is in another state, the information fails to be imported. In this case, troubleshoot the failure based on the following solutions and import the information about the migration source again:

      • Troubleshoot the failure based on the message displayed in the SMC console or the log file in the directory where the SMC client is installed. By default, the SMC client is installed in the following directory:

        • Windows server: C:\smc

        • Linux server: /smc

      • Refer to the FAQ and Troubleshooting topics for troubleshooting.

Step 2: Create a migration job

  1. Find the migration source that you want to manage, click Create Migration Job in the Actions column.

  2. In the Create Migration Job dialog box, configure the parameters and click Create.

    1. Configure the basic parameters described in the following table.

      Parameter

      Description

      Example

      Migration Job Name

      The name of the migration job.

      Lightweight server migration

      Job Description

      The description of the migration job.

      test

      Destination Type

      Select Simple Application Server.

      Simple Application Server

      Destination Region

      Required. The region of the simple application server to which you want to migrate your data. For more information, see Regions and zones.

      China (Hangzhou)

      Destination Instance

      Required. The simple application server to which you want to migrate data.

      The storage system and operating system of the simple application server must be compatible with the storage system and operating system of the migration source. For example, you can migrate data only from a Linux migration source to a Linux simple application server, or from a Windows migration source to a Windows simple application server.

      Important
      • To prevent migration failures, do not stop, start, restart, or release the simple application server during the migration.

      • If the number of data disks attached to the simple application server is smaller than the number of data disks attached to migration source, data on the data disk attached to the migration source is not fully migrated to the simple application server.

      • If the disk size of the simple application server is smaller than the disk size of the migration source, we recommend that you scale up the disk of the simple application server before you create the migration job. For more information, see Extend a data disk.

      -

      Execution Method

      The mode in which to execute the migration job. Valid values:

      • Migrate Now: The migration job starts immediately after it is created. This is the default value.

      • Migrate Later: The migration job automatically starts at the specified time after it is created.

        Note

        The earliest time that you can specify to run a migration job is 10 minutes after the job is created.

      • Create Only: After the migration job is created, you must click Run in the Actions column to manually start the migration job.

      Keep the default setting

    2. Configure the disk parameters described in the following table.

      Parameter

      Description

      Example

      Destination Disk Size (GiB)

      The disk configurations of the destination instance. Configure the following parameters based on your business requirements:

      System disk

      • System Disk: the size of the system disk of the destination instance. Unit: GiB. Valid values: 20 to 2048. The size of the destination system disk must be larger than the amount of data on the source system disk. For example, if the total size of the source system disk is 400 GiB but the size of data stored on this disk is only 100 GiB, you must set this parameter to a value greater than 100.

        Note

        The default value of this parameter is the size of the source system disk. We recommend that you retain the default value or specify a greater value.

      • Partition <N>: the size of the partition. SMC generates a partitioning scheme for the destination data disk based on the partitioning scheme of the source data disk. Unit: GiB. Valid values of N: 0 to 14. <N> indicates the serial number of the partition. For example, if the system disk of the migration source has only one partition, Partition 0 is generated.

      Data disk

      • Data Disk <N>: the size of the data disk of the destination instance. Unit: GiB. Valid values: 20 to 32768.

        • If you select the Data Disk <N> check box, a destination data disk is generated.

        • <N> indicates the serial number of the data disk.

        • The size of the destination data disk must be larger than the amount of data on the source data disk. For example, if the total size of the source data disk is 500 GiB but the size of data stored on this disk is only 100 GiB, you must set this parameter to a value greater than 100.

      • Partition <N>: the size of the partition. SMC generates a partitioning scheme for the destination data disk based on the partitioning scheme of the source data disk. Unit: GiB. Valid values of N: 0 to 14. <N> indicates the serial number of the partition. For example, if a data disk of the migration source has only one partition, Partition 0 is generated.

      Note

      If your migration source has no data disk or no data disk is attached to the migration source, the Data Disk parameters are not displayed. For more information, see the "Why are the data disk parameters of a migration source not displayed in the Create Migration Job dialog box? What do I do?" section of the FAQ topic.

      Block replication

      SMC allows or disallows you to turn on the switch based on whether the migration source supports block-level replication for partitions.

      • If the migration source does not support block replication for partitions, you cannot turn on the switch. If SMC uses the default method to migrate the migration source at the file level, you can modify the size of each partition on the destination disk.

      • If the migration source supports block replication for partitions, the switch is turned on by default. You can migrate disk data at the partition level. The block replication feature ensures stable data transmission. The feature also ensures that the source and destination disks use the same partitioning scheme. However, you cannot modify the size of each partition on the destination disk.

      Note

      If your source server runs Windows, block replication is enabled by default. You cannot disable this feature.

      Keep the default setting

    3. Optional. Click Advanced Settings to configure advanced parameters such as Network Type and Compression Ratio. The following table describes the advanced parameters.

      Parameter

      Description

      Example

      Network Type

      SMC migrates data to the intermediate instance over the Internet. If you select Public Network, make sure that the source server can access the Internet. You can determine whether to specify a VPC and a vSwitch based on your business requirements.

      • If you specify a VPC and a vSwitch, SMC creates an intermediate instance that connects to the specified VPC and vSwitch.

      • If you do not specify a VPC or vSwitch, SMC creates an intermediate instance that connects to the VPC and vSwitch automatically created by the system.

      Keep the default setting

      Transmission Speed Limit

      The maximum network transfer speed during the migration. Unit: Mbit/s. If you set the Compression Ratio parameter to a value greater than 0, the actual network transfer speed, which is the transfer speed of compressed data, is lower than the speed displayed in the Real-time Migration Status column.

      Keep the default setting

      Compression Ratio

      The compression ratio of the data to be migrated. Set the compression ratio based on your business requirements.

      • If the bandwidth is limited, a high compression ratio improves the transmission efficiency.

      • If a high bandwidth is available, we recommend that you do not compress data. Data compression consumes CPU resources of the migration source.

      Valid values: 0 to 10. Default value: 7. A value of 0 indicates that data is not compressed.

      Keep the default setting

      Checksum Verification

      Specifies whether to verify data integrity by using a checksum. By default, this feature is disabled. If you enable this feature, data integrity is ensured, but transmission speed may be reduced.

      Keep the default setting

      Migration Job Tags

      The tags that you specify for the migration job. Each tag contains a key and a value. You can use tags to query and manage migration jobs. For more information, see Use tags to manage migration sources and migration jobs and Use tags to implement fine-grained access control.

      Note

      You can specify up to 20 tags for a migration job.

      Keep the default setting

  3. In the message that appears, read the migration notes and click Got It.

  4. In the Migration Jobs section of the details page of a migration job, view the status of the created job.

    The amount of time required for data transmission is subject to factors such as the data size of the migration source and network bandwidth. Wait until the migration job is complete.

    Note

    When the migration job is in the Synchronizing state, the Speed and Time Remaining for Synchronization parameters are displayed in the Real-time Migration Status column:

    • Speed: the amount of data that is migrated per second, which indicates the transfer speed of uncompressed data. If you set the Compression Ratio parameter to a value greater than 0, the actual network transfer speed, which is the transfer speed of compressed data, is lower than the displayed speed.

    • Time Remaining for Synchronization: the remaining synchronization time calculated based on the current speed by using the following formula: Time remaining for synchronization = (Total data size - Transferred data size)/Speed.

    image

    When the migration job is in the Synchronizing state, you can perform the following operations as needed:

    • Modify the migration job: In the Actions column, click Modify Migration Job to modify the Transmission Speed Limit, Compression Ratio, and Checksum Verification parameters.

    • Pause the migration job: In the Actions column, click Pause Migration Job.

  5. Optional. To view the task details, perform the following steps:

    1. Find the migration job whose details you want to view and click the migration source ID or name in the Migration Source ID /Name column, as shown in the following figure.

    2. On the job details page, view the job details in the Migration Jobs section, as shown in the following figure.

Verify the migration result

  • If Completed is displayed in the Real-time Migration Status column, the migration is successful.

    image

    • After the migration is complete, you can check whether the data on the simple application server is complete and whether the simple application server and applications on the simple application server run as expected. Procedure:

      1. Click View Destination Instance in the Actions column that corresponds to the migration job that you executed.

        You are navigated to the Simple Application Server console.

      2. Log on to the simple application server. For more information, see Connect to a Linux server or Connect to a Windows server.

      3. Check the data and applications on the simple application server. For more information, see the How do I check my system after I migrate a Linux server or How do I check my system after I migrate a Windows server? section of the "FAQ" topic.

      4. Note

        The IP address changes after data is migrated. Perform the following operations:

        • Change the IP address of the server after the migration if your business involves IP address configuration.

        • If a domain name has been bound to the source server, the public IP address of the server is changed after the migration. In this case, you must resolve the domain name to the new public IP address of the server For more information, see Add an A record for a website domain name.

  • If InError is displayed in the Real-time Migration Status column, the migration failed.

    In this case, you need to perform the following operations:

    1. Click Troubleshoot Errors in the Actions column and fix the failure based on the error code and error message. For more information, see FAQ and Troubleshooting.

    2. On the Migration Jobs page, click Retry Migration Job.

      The migration job resumes from the point where it was suspended.