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
- Open the EventSentry Management Console
- Note down the eventsentry_svc password from the database action's connection string
- Note down the eventsentry_web password from the C:\Program Files (x86)\EventSentry\WebReports\conf\configuration.xml file (<dbPassword>)
- If using the collector, stop all local EventSentry services (under Services). If not using the collector then also stop all remote agents.
- Close the EventSentry management console
- Open pgAdmin III and connect to the EventSentry database (see related links at the bottom)
- Right-click the database and select "Backup"
- Browse to a folder with sufficient disk space and specify a file name for the backup file, select the "Custom" format and click Backup.
- When complete, close pgAdmin.
- Stop the EventSentry Database service
- Open pgAdmin (without the III) and connect to the new instance. By default the instance runs on localhost, port 5433.
- Right-click "databases" and create a new "EventSentry" database.
- Right-click the new "EventSentry" database and select Restore. Browse to the previously created backup file and start the restore process.
- Verify that all tables exist in the new database
- Close pgAdmin
- Stop the EventSentry Database v9.6 service
- Open regedit.exe
- Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventsentrydatabase
- In the ImagePath value, change 5432 to 5433
- Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventsentrydatabase96
- In the ImagePath value, change 5433 to 5432
- Start the EventSentry Database v9.6 service
- Start the EventSentry Database service
- Open the management console and ignore any authentication errors you may get
- Select the Primary Database action and click the Initialize or Update Database button
- When prompted, specify the passwords for the eventsentry_web and eventsentry_svc
- The configuration assistant should process and update the database without errors.
- Click the Test button in the action to verify that connectivity to the database is successful
- Select Services and start all local services that were previously running. If not using the collector then also start all remote agents
- Navigate to the EventSentry Web Reports to ensure that all data is accessible without issue.