[KB8593] Migrate the ESET Inspect Server MySQL database to a different MySQL Server

Issue

Solution

ESET Security Services for ESET Inspect On-Prem and ESET Inspect

ESET offers various security service packages and additional support for these applications. Support for ESET Inspect On-Prem and ESET Inspect is limited and managing rules or exclusions are not included without an ESET Security Service package. Contact a sales representative for further assistance.

Prerequisites

  • Both the source and target MySQL Server instances must be installed
  • The target MySQL Server instance must be the same version or later as the source MySQL Server instance; downgrading is not supported

Network and file transfer requirements

  • If the source and target machines are on different networks, you must manually transfer the backup file to the target machine
  • If the source and target machines are on the same network, you can run the migration commands from either the source or target machine (ensure ping connectivity works)

Placeholder replacement

In the commands, replace the placeholders as follows:

  • SRCHOST → hostname or IP address of the source MySQL Server
  • SRCROOTLOGIN → username of the root account on the source MySQL Server
  • SRCEEIDBNAME → name of the source ESET Inspect Server database
  • TARGETHOST → hostname or IP address of the target MySQL Server
  • TARGETROOTLOGIN → username of the root account on the target MySQL Server

Migrate the ESET Inspect Server MySQL database to a different MySQL Server instance or version using the command line

To migrate the ESET Inspect Server MySQL database to a different MySQL Server instance or version using the command line, follow the steps below:

  1. Stop the ESET Inspect Server service.

  2. Locate MySQL binaries. Navigate to the MySQL bin directory based on your installed version:

    • MySQL 5: C:\Program Files\MySQL\MySQL Server 5.7\bin

      To navigate to the bin directory in Command Prompt, run:

      cd C:\Program Files\MySQL\MySQL Server 5.7\bin
    • MySQL 8: C:\Program Files\MySQL\MySQL Server 8\bin.

      To navigate to the bin directory in Command Prompt, run:

      cd C:\Program Files\MySQL\MySQL Server 8\bin
  3. Create a full backup of the source ESET Inspect Server database. From the bin directory, in Command Prompt, run:

    mysqldump --host=SRCHOST --user=SRCROOTLOGIN -p --events --opt --routines --triggers --databases SRCEEIDBNAME --default-character-set=utf8mb4 --result-file="C:\USERS\public\BACKUPFILE.sql"

    You can include the password for SRCROOTLOGIN directly in the command: replace -p with -pYourPassword. If you do not include the password, you will be prompted to type it after running the command.

    Manual transfer of the backup file

    The command creates the ESET Inspect Server database backup file (BACKUPFILE.sql) in C:\USERS\public. If the source and target MySQL servers are on different machines and not on the same network, you must manually transfer the backup file to the target machine before restoring the ESET Inspect Server database.

  4. Adjust the MySQL configuration for the target MySQL Server: edit the my.ini file according to your MySQL version.

  5. Log in to the target MySQL Server. In Command Prompt, run:

    mysql --host=TARGETHOST --user=TARGETROOTLOGIN -p

    You can include the password for TARGETLOGIN directly in the command: replace -p with -pYourPassword. If you do not include the password, you will be prompted to type it after running the command.

  6. Create the purge tablespace. At the the mysql> prompt, run:

    CREATE TABLESPACE `purge_ts` ADD DATAFILE 'purge_ts1.ibd' ENGINE=INNODB;
  7. Restore the ESET Inspect database on the target MySQL Server. Exit the mysql> prompt: run exit;. In Command Prompt, run:

    mysql --host=TARGETHOST --user=TARGETROOTLOGIN -p < "C:\USERS\public\BACKUPFILE.sql"

    You can include the password for TARGETLOGIN directly in the command: replace -p with -pYourPassword. If you do not include the password, you will be prompted to type it after running the command.

    If the location of the backup file is not C:\USERS\public\BACKUPFILE.sql, replace it in the command with the actual location of the backup file.

  8. Finish the migration based on your setup:

    • If the target MySQL Server uses the same hostname/IP address and database name as the source, restart the ESET Inspect Server service.

    • If the target MySQL Server hostname/IP address, port, or database name differs from the source, run the ESET Inspect Server installer in the Repair / Change mode. Keep all settings unchanged, but update the MySQL database connection details (hostname/IP address, port, database name).