Migration Guide on Standalone Deployment
When migrating the CloudCX Application for any reason, it is essential to review this document beforehand to maintain data integrity. The subsequent sections offer comprehensive insights into the necessary preparations and implementation.
Migration necessitates a period of downtime for processing. Please ensure that you are adequately prepared before the migration.
- 1 Preparation work
- 2 Start migration
- 2.1 1. Create the same CX service installation path on Server-B as on Server-A
- 2.2 2. Enter the installation path in Server-B and start copying backup files
- 2.3 3. Decompress the backup file under the installation path of Server-B
- 2.4 4. Modify and save private IP address
- 2.5 5. Run the script on Server-B to start restoring data and services
- 2.6 6. Done!
The file paths operated by the following commands are all sample paths. Please replace them with the actual installation path when implementing them.
Preparation work
Perform the following commands as root to stop & rm the current CX Docker instance on an older machine (Name as A):
cd /opt/cloud_cx && /bin/sh cloud_cx_ctl.sh stop
cd /opt/cloud_cx && /bin/sh cloud_cx_ctl.sh rm |
Prepare the new server(Name as B) and ensure that the original domain name of CloudCX points to the IP address where the new server is located.
Please ensure that the disk size of Server-B is sufficient to store the data to be migrated and can perform subsequent dynamic expansion.
You can execute the following command on Server-A to view the basic space occupied by the current CX service data.
|
Compress CX data on Server-A to prepare for migration - make sure Server-A has enough disk size to store the new compressed files.
|
Migration medium:
You can set up an FTP/SFTP server on Server-A, and then use the FTP Client on Server-B for downloading.
You can put the backup file on the external hard drive and copy it to the new server.
You can use Linux
scp
command for remote file transfer.
The following will use the scp
command as an example to illustrate.
Start migration
1. Create the same CX service installation path on Server-B as on Server-A
|
2. Enter the installation path in Server-B and start copying backup files
|
3. Decompress the backup file under the installation path of Server-B
|
4. Modify and save private IP address
# 1. Get the current private IP address by "ip addr" command
ip addr
# 2. open the file
cd /opt/cloud_cx && nano .env
# 3. Change HOST_IP to the IP in step 2; and save the file
# If there are multiple IP addresses, separate them with commas.
# HOST_IP=192.168.1.2,172.27.202.123
ctrl X ---> y |
5. Run the script on Server-B to start restoring data and services
cd /opt/cloud_cx && /bin/sh install_docker_cx.sh
cd /opt/cloud_cx && docker compose up -d |
6. Done!
Migration has been successfully completed! We invite you to review the updated situation.