Skip to main content

Migration Steps

After successfully creating the admin migration user, follow the below migration steps:

  1. In RHEL 8 and 9 make the following files executable:

    chmod a+rwx /usr/local/Secunia/csi/install/util/migratedb.sh

    chmod a+rwx /usr/local/Secunia/csi/install/util/dumpPDB.php

  2. In RHEL 8 and 9 run the below script:

    /usr/local/Secunia/csi/install/util/migratedb.sh

  3. After running the script, you can see a log folder get created at /usr/local/Secunia/csi/install/util/ with the migration successful message. If a log folder is not created then you need to verify the permission of dumpPDB.php, migratedb.sh files.

  4. Script will ask for the below details of source server (RHEL 7) and destination server (RHEL 8 or 9):

    Source IP

    Source MySQL username

    Source MySQL password

    Destination IP

    Destination MySQL username

    Destination MySQL password

  5. Run the below commands for permission and to copy the previously generated reports (pdf and csv):

    • On RHEL 8 / RHEL 9— Use the following command:

      chmod a+rw /usr/local/Secunia/csi/reports

    • On RHEL 7— Use the following command:

      rsync -av /usr/local/Secunia/csi/reports/* root@<RHEL8 IP>:/usr/local/Secunia/csi/reports/

  6. Start services using the below commands:

    systemctl start sgdaemon.service

    systemctl start scandaemon.service

    systemctl start haproxy.service

  7. After migration, remove mysql user - 'mig_admin'@'%' from both the servers using the below commands:

    DROP USER 'mig_admin'@'%';

    FLUSH PRIVILEGES;