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

Article ID: 469
Category: Database
Applies to: 5.x
Updated: 2022-07-08

The default and recommended database upgrade path when upgrading to EventSentry v5 is to access existing data from the v9.6 database through a separate profile in the web reports and start storing future data in the newer v14.2 database.

Migrating existing data from the older v9.6 to the newer v14.2 is possible with a migration script, but is only recommended when accessing historical data through a separate web reports profile is not feasible.

Prerequisites:
1. At least as much extra disk space is available as is currently used by PostgreSQL v9.6 (C:\Program Files (x86)\EventSentry\data96)
2. Downtime for EventSentry while data is migrated
3. Working backup of the existing database

The EventSentry migration script utilizes the pg_dumpall utility that ships with PostgreSQL v14 database to migrate the data from one database to another. While the data migration process is usually successful, we cannot guarantee that the migration will work successfully in all cases.

While the migration runs, all EventSentry services will be unavailable.

Instructions:

  1. Ensure that all EventSentry agents are stopped if the collector is not being utilized
  2. Open an elevated command prompt
  3. Navigate to C:\Program Files\EventSentry\config_assistant
  4. Run es_installer_db_migrate.cmd migrate
  5. If the migration script reports errors then review the %WINDIR%\system32\eventsentry\logs\es_db_migration.log log file and contact support if necessary

Verification:
Assuming that no errors were reported, follow the steps below to verify that the database migration was successful:

  1. Click the Test button in the action to verify that connectivity to the database is successful
  2. Navigate to the EventSentry Web Reports to ensure that all data is accessible

Post-Migration:
Perform the steps below after the migration has completed and verified successfully:

  1. Restart any remote agents that were stopped before the migration
  2. Set the startup type of the EventSentry Database v9.6 to manual
  3. Optional: Follow KB article 467 to remove the v9.6 database


Try EventSentry on-premise

FREE 30-day evaluation

Download Now