To move VMmanager from one server to another you need to perform following steps:

  1. Import VMmanager data.
  2. Import the domain name if it assigned to the source server.
  3. Change the license token

Step 1. Import VMmanager data


Note

If you do not need to migrate statistics data, you can back up the platform on the source server and recovery backup data on the target server. For more information, see Creating platform backups.

  1. On the target server:
    1. Install VMmanager. Learn more in the article Installation.
    2. Suspend VMmanager and delete the containers:

      vm down
      CODE
    3. Delete the data created by the installer:

      rm -rf /opt/ispsystem/vm/mysql /opt/ispsystem/vm/clickhouse /opt/ispsystem/vm/config.json
      
      CODE
    4. Check that the nodes and virtual machines of the source server are accessible from the target server. Edit the firewall configuration if needed.
  2. On the source server:

    1. Stop VMmanager and delete its docker containers:

      vm down
      CODE
    2. Move the directories /opt/ispsystem/vm/mysql/, /opt/ispsystem/vm/telegram-srv/, /opt/ispsystem/vm/clickhouse/ and the file /opt/ispsystem/vm/config.json to the target server. For example:

      Move the data using rsync

      rsync -avzP /opt/ispsystem/vm/{mysql,clickhouse,config.json} user@1.2.3.4:/opt/ispsystem/vm/
      CODE

      user  the username on the target server;

      1.2.3.4   the IP address of the target server.

      Be sure to transfer the config.json file to the destination server.

      Directories:

      • mysql  be sure to transfer to the destination server;
      • telegram-srv — to be transferred if integration with telegram is configured;
      • clickhouse  to be transferred if it is necessary to preserve the statistics;
      • socket and consul — do not need to be transferred.

      Note

       rsync must be installed both on the source and target servers.

    3. Stop and deactivate VMmanager service:

      systemctl stop vm
      CODE
      systemctl disable vm
      CODE
  3. Start VMmanager on the target server: 

    vm start
    CODE
  4. If the migration was successful, remove the platform from the source server:
    1. Stop VMmanager service and disable it: 

      systemctl stop vm.service
      CODE
      systemctl disable vm.service
      CODE
    2. Delete the information about the platform operation:  

      rm /opt/ispsystem/vm -rf
      CODE
    3. Remove the installed docker images and containers: 

      docker system prune -a -f
      CODE
    4. Remove Docker software: 

      AlmaLinux, CentOS, RED OS

      yum remove docker-ce docker-ce-cli docker-ce-rootless-extras containerd.io
      CODE

      Ubnutu, Astra Linux

      apt remove docker-ce docker-ce-cli docker-ce-rootless-extras containerd.io
      CODE

Step 2. Move the domain name


  1. Edit the A-record: change the IP address of the source server into the IP of the target one.
  2. If an SSL certificate is connected to the domain, copy its files from the source server to the target one.

Note

Create a temporary subdomain while you are moving the domain. If your SSL certificate doesn't support Wildcard, receive a free Let's Encrypt certificate for the subdomain. 

Step 3. Change the license token


When moving the platform to the new server, you need to recreate the license token. If you purchased a license from ISPsystem, change the Token value for your license in eu.ispsystem.com client area.

To update your license token information:

  1. Connect to VMmanager via SSH protocol with superuser permission (the default level is root).
  2. Go to the directory with the license files: 

    shopt -s extglob
    BASH
    cd /opt/ispsystem/license
    BASH
  3. Delete all files from the directory except machine_id

    rm -v !("machine_id")
    BASH
  4. In VMmanager interface, go to System information.

  5. In the License key field enter the value of the license token.
  6. Click the Activate button.