If upgrading a Simple Application Server instance cannot meet your business requirements, or if you need to move the instance to another region, you can migrate its data to another instance in the same or a different region within your Alibaba Cloud account. This topic describes how to perform same-region and cross-region data migration for Simple Application Server instances.
Prerequisites
-
Ensure that the source Simple Application Server instance is running. If the instance has expired, you must first renew it. For more information, see Renewal.
-
If you have already created the destination Simple Application Server instance, ensure that both the source and destination instances use the same image version. If the versions differ, you must reset the destination instance. For more information, see Reset an instance.
Migration scenarios
In the example scenarios for this topic, we migrate the Mantis open source bug tracking system from a source instance to a destination instance. After the migration, the system must be operational and all data must be intact. The following table describes the scenarios.
If upgrading the instance configuration can meet your business requirements, we recommend upgrading the instance directly. For more information, see Upgrade configurations.
|
Scenario |
Source instance configuration |
Destination instance configuration |
|
Same-region migration |
Note
In this example, the Mantis open source bug tracking system is assumed to be deployed on Simple Application Server A. For more information, see Deploy the Mantis open source bug tracking system. |
|
|
Cross-region migration |
Before you begin
-
Create a snapshot to back up data.
We recommend that you create a snapshot for the new Simple Application Server instance. If the migration fails and causes data loss or corruption, you can use the snapshot to roll back the instance's cloud disk. For more information, see Create a snapshot.
-
Check the network.
Ensure that each Simple Application Server instance has public internet access. If you perform a cross-region migration between different countries, network instability can slow the migration.
-
Check licensed applications on the instance.
Simple Application Server instances in different regions are located in different VPCs. If you perform a cross-region migration, the underlying hardware changes. This may invalidate application licenses that are bound to hardware. Check and manage your licenses accordingly.
-
Ensure that the source and destination instances have the same runtime environment version.
Some websites have strict requirements for runtime environment versions. If the versions on the source and destination instances do not match, the website may fail to run after migration. We recommend that you use the same image version for both instances. If the versions are different, you must reset the destination instance. For more information, see Reset an instance.
NoteWebsite configurations can be complex. During the migration, you must manually replicate any custom configurations for applications such as Nginx or Apache from the source instance to the new instance.
-
The public IP address of the instance will change.
Different Simple Application Server instances have different public IP addresses. If you previously bound a domain name to the source instance, you must rebind the domain name to the new instance and update the DNS records after the migration is complete.
Procedure
Same-region migration
This section describes how to migrate Simple Application Server A to Simple Application Server B within the same region.
-
Create a custom image for the source instance. For more information, see Create a custom image.
-
Determine if you have already created Simple Application Server B in the destination region.
-
If yes, reset Simple Application Server B. For more information, see Reset an instance.
-
In the left-side navigation pane, click Servers.
-
On the card of the destination Simple Application Server instance, choose .
-
In the Server Resetting dialog box, select Replace with Another Image and click the Custom Images tab.
-
Select the custom image that you created in Step 1. In the Advanced Configuration section, set the instance password and click Confirm Resetting.
-
-
If no, create Simple Application Server B from the custom image that you created in Step 1. For more information, see Create an instance from a custom image.
-
-
Verify the migration.
On your local machine, use a browser to visit
public IP address of Simple Application Server B/index.php. You can then view and use the Mantis system. which indicates that the Simple Application Server migration is successful.NoteYou can find the public IP address on the card of Simple Application Server B.
The Mantis Bug Tracker login page appears with a Username field and a Login button, which indicates that the Mantis system is accessible.
Cross-region migration
This section describes how to migrate Simple Application Server A to Simple Application Server B across different regions.
-
Create a custom image for the source instance. For more information, see Create a custom image.
-
Copy the custom image.
The following steps describe how to copy a custom image to a target region. For more information, see Copy a custom image.
-
In the left-side navigation pane, click Image.
-
Find the custom image and click Copy Image in the Actions column.
-
In the Copy Image dialog box, configure the parameters.
The following table describes the parameters.
Parameter
Description
Destination Region
Select the region to which you want to copy the custom image. In this example, select Singapore.
Name
Enter a name for the copied custom image. The name must be 2 to 128 characters in length. It cannot start with a special character or digit and can only contain underscores (_) and hyphens (-).
Description
The default description contains the region and image ID of the source custom image. You can modify this description. It must be 2 to 256 characters long and cannot start with http:// or https://.
-
Click OK.
On the Image page, the custom image appears with a Copying status. Wait for the process to complete.
NoteThe copied custom image does not include the source Server Name.
-
-
Determine if you have already created Simple Application Server B in the destination region.
-
If yes, reset Simple Application Server B. For more information, see Reset an instance.
-
In the left-side navigation pane, click Servers.
-
On the card of the destination Simple Application Server instance, choose .
-
In the Server Resetting dialog box, select Replace with Another Image and click the Custom Images tab.
-
Select the custom image that you created in Step 1. In the Advanced Configuration section, set the instance password and click Confirm Resetting.
-
-
If no, create Simple Application Server B from the custom image that you created in Step 1. For more information, see Create an instance from a custom image.
-
-
Verify the migration.
On your local machine, use a browser to visit
public IP address of Simple Application Server B/index.php. You can then view and use the Mantis system. which indicates that the Simple Application Server migration is successful.NoteYou can find the public IP address on the card of Simple Application Server B.
The Mantis Bug Tracker login page appears with a Username field and a Login button, which indicates that the Mantis system is accessible.
Related operations
After the migration, the instance is replaced and its public IP address changes. If you previously bound a domain name to the source instance, you must rebind the domain name to the new instance and update the DNS records. For more information, see Register and resolve a domain name.