How do I migrate data from the legacy v9.1 built-in PostgreSQL database to the newer v9.6 PostgreSQL database?

Article ID: 330
Category: Database
Applies to: 3.3 and higher
Updated: 2017-11-09

Follow the steps outlined below in order to migrate all data from the legacy v9.1 built-in PostgreSQL database to the newer v9.6 PostgreSQL database.

Prerequisites:


  • Sufficient disk space for a database backup file

  • Sufficient disk space to restore from the database backup file

  • Downtime for EventSentry while data is backed up and restored

Instructions


  1. Open the EventSentry Management Console

  2. Note down the eventsentry_svc password from the database action's connection string

  3. Note down the eventsentry_web password from the C:\Program Files (x86)\EventSentry\WebReports\conf\configuration.xml file (<dbPassword>)

  4. If using the collector, stop all local EventSentry services (under Services). If not using the collector then also stop all remote agents.

  5. Close the EventSentry management console

  6. Open pgAdmin III and connect to the EventSentry database (see related links at the bottom)

  7. Right-click the database and select "Backup"

  8. Browse to a folder with sufficient disk space and specify a file name for the backup file, select the "Custom" format and click Backup.

  9. When complete, close pgAdmin.

  10. Stop the EventSentry Database service

  11. Open pgAdmin (without the III) and connect to the new instance. By default the instance runs on localhost, port 5433.

  12. Right-click "databases" and create a new "EventSentry" database.

  13. Right-click the new "EventSentry" database and select Restore. Browse to the previously created backup file and start the restore process.

  14. Verify that all tables exist in the new database

  15. Close pgAdmin

  16. Stop the EventSentry Database v9.6 service

  17. Open regedit.exe

  18. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventsentrydatabase

  19. In the ImagePath value, change 5432 to 5433

  20. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventsentrydatabase96

  21. In the ImagePath value, change 5433 to 5432

  22. Start the EventSentry Database v9.6 service

  23. Start the EventSentry Database service

  24. Open the management console and ignore any authentication errors you may get

  25. Select the Primary Database action and click the Initialize or Update Database button

  26. When prompted, specify the passwords for the eventsentry_web and eventsentry_svc

  27. The configuration assistant should process and update the database without errors.

  28. Click the Test button in the action to verify that connectivity to the database is successful

  29. Select Services and start all local services that were previously running. If not using the collector then also start all remote agents

  30. Navigate to the EventSentry Web Reports to ensure that all data is accessible without issue.




Try EventSentry on-premise

FREE 30-day evaluation

Download Now