Migrating Operations Management Node and Database

This procedure is a part of the platform nodes migration from an on-premise environment to Azure cloud.

To migrate the Operations MN and DB to destination servers:

  • Step 1. Prepare for the migration.
  • Step 2. Perform the pre-checks.
  • Step 3. Back up the data on the source Operations MN and DB hosts and transfer the data archive to the destinationOperations MN and DB hosts.
  • Step 4. Restore the data from the backup on the destination hosts.

Step 1. Prepare for the Migration

  1. Perform the general pre-migration steps for platform nodes.
  2. Ensure a passwordless SSH connection for the root user between:
    • the source Operations MN and the source Operations DB
    • the destination Operations MN and the destination Operations DB
  3. Before backing up Operations MN, make sure that there are no custom services on the node (such services as apache, bind, proftpd, and so on, which are typically installed to slave nodes). To do so, check the services list on Operations MN.
  4. On Operations DB node, adjust the timezone settings:

    Go to /var/lib/pgsql/<PostgreSQL_Version>/data/postgresql.conf. If the timezone and log_timezone fields have the Host value, change it to the required timezone.

Step 2. Perform the Pre-checks

On the source Operations MN host:

  1. Log in to Operations MN as root.
  2. Download the backup-restore scripts to the source node.
  3. Extract the archive with the following command:

    tar -xf mn_backup_restore_v.x.x.x-scripts.tar
  4. Go to the unpacked directory:

    cd mn_backup_restore_tools
  5. Run the pre-checks with the following command:

    ./mn_backup.sh -o /OA_MN_BACKUP -t mn-backup-precheck

    Where:

    • /OA_MN_BACKUP is the directory on the source node where the backup will be placed.
    • Option -t is the target action (pre-check before back-up, in this example).
  6. If the pre-check fails, follow the recommendations in the script output.
  7. If there are custom services which you also need to migrate, refer to https://kb.cloudblue.com/en/130183.

Step 3. Backup and Transfer the Data

Important: Before backing up Operations MN, make sure that there are no custom services on the node (such services as apache, bind, proftpd, and so on, which are typically installed to slave nodes).

  1. Log in to the source Operations MN as root through SSH.

    Note: If the Operations database is already migrated (for example, using database replication), pass the --db-already-transferred flag as follows:
    ./mn_backup.sh -o /OA_MN_BACKUP -t mn-backup --db-already-transferred"

  2. If it is impossible to use the network interface names from the source Operations MN host on the destination host, apply KB 132165.
  3. Run the backup with the following command:

    ./mn_backup.sh -o /OA_MN_BACKUP -t mn-backup

    where /OA_MN_BACKUP is the backup directory

  4. After the operation is completed, the backup data will be stored on the source host in the directory specified with the -o option.
  5. Transfer the backup directory (/OA_MN_BACKUP) to the destination Operations MN.
  6. If the Windows Azure Pack component is installed on the source MN, back up the additional data as described in the Backup section of Migrating of Operations MN with Windows Azure Pack Installed.
  7. If Postfix is used as the mail transfer agent on the source MN, transfer configuration files to the destination server (by default, Postfix configuration files are in /etc/postfix).
  8. For future uses, remember the host name and the external and internal IP addresses of the source hosts (Operations MN and Operations DB).
  9. Stop the hosts with the source Operations MN and DB.

Step 4. Restore the Data and Configure IP Addresses

To complete the migration process, restore the backed-up files on the destination Operations MN:

  1. Log in to the destination Operations MN as root through SSH.
  2. Assign the IP addresses of the source hosts to the destination hosts (the destination Operations MN and the destination Operations DB).
  3. Configure the destination Operations MN hostname so that it matches the source hostname.
  4. Make sure that hostname resolution is the same as on the source node:
    1. Check the hostname IP address:

      hostname -i
    2. Change the name, if necessary:

      hostnamectl set-hostname <NAME>
  5. If a virtualization technology is used, make sure that it has the correct settings (such as IP addresses, hostname, and name servers) for the destination node.
  6. Go to the previously copied /OA_MN_BACKUP with the backed-up data.
  7. To restore the backup, execute the following command:

    ./install.py --migrate --communication_ip=BACKNET_IP [--external_ip=FRONTNET_IP]

    Where BACKNET_IP is the Operations MN backnet IP address and FRONTNET_IP is the frontnet IP address.

    Note: FRONTNET_IP is optional. Omit it if Operations MN does not have a frontnet IP address.

  8. If Windows Azure Pack is installed on the source Operations MN, restore the additional data as described at https://kb.cloudblue.com/129058.
  9. After the data is restored, all the necessary services will be launched automatically and you will be able to work with Operations.