Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

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 steps.

Note

Migration necessitates a period of downtime for processing. Please ensure that you are adequately prepared prior to before the migration..

Table of Contents
maxLevel6
minLevel1
include
outlinefalse
indent
exclude
typelist
printablefalse
class
Info

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

  1. Perform the following commands as root to stop & rm the current CX Docker instance on an older machine (Name as A):

Bash
Code Block
cd /opt/cloud_cx && /bin/sh cloud_cx_ctl.sh stop


cd /opt/cloud_cx && /bin/sh cloud_cx_ctl.sh rm
  1. 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.

  2. 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.

...

cd /opt && du -sh cloud_cx

  1. Compress CX data on Server-A to prepare for migration - make sure Server-A has enough disk size to store the new compressed files.

Bash
cd /opt/cloud_cx && tar -czvf cloudcx_bak_20241014.tar.gz ./

  1. 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.

...

1. Create the same CX service installation path on Server-B as on Server-A

...

mkdir /opt/cloud_cx

2. Enter the installation path in Server-B and start copying backup files

Bash
cd /opt/cloud_cx && scp root@{{server-A-ip}}:/opt/cloud_cx/cloudcx_bak_20241014.tar.gz .

3. Decompress the backup file under the installation path of Server-B

Bash
cd /opt/cloud_cx && tar -vxf cloudcx_bak_20241014.tar.gz

4. Modify and save private IP address

Code Block
# 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

Bash
Code Block
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.

...