NoMa sqlite3 to PostgreSQL Conversion
1.0 General Information
This document outlines steps to convert NoMa from sqlite3 to PostgreSQL.
 |
- This procedure is for a system that was upgraded from a pre-7.1.x version of GroundWork Monitor with NoMa.
- These steps can only be performed on a system running 7.1.x.
- Prior to 7.1.x, the NoMa connection was hardcoded to use sqlite3. In 7.1.x the database selection in the NoMa.yml file is honored.
|
 |
- Fresh installs of GroundWork Monitor version 7.1.1 do not need to perform this conversion.
|
2.0 Conversion Steps
Step 1 - Prerequisites
- Back up existing NoMa database:
- Source environment variables:
- Stop NoMa prior to database work:
Step 2 - Cleanup existing sqlite3
- Compact the database:
- Check database integrity:
- Remove any queued notifications:
- Exit out of sqlite3:
Step 3 - Migrating sqlite3 to PostgreSQL
- Change directory to /usr/local/groundwork/core/migration/postgresql:
- Convert the existing NoMa database to PostgreSQL using:
- Validate the PostgreSQL database now has the data from the sqlite3 database:
- Log into psql command line, the default password is nomapass:
- Validate data was migrated successfully by examining the notifications table:
- Run the following commands to set the appropriate sequences for the Postgresql NoMa database:
- Exit out of psql:
- If you were using sqlite3 after the 7.1.x upgrade, edit the /usr/local/groundwork/etc/NoMa.yml file to use postgresql instead of sqlite3:
- Start NoMa service: