- 24 Jan 2025
-
DarkLight
-
PDF
Database Migration Script
- Updated on 24 Jan 2025
-
DarkLight
-
PDF
Run DB Migration
A migration script must be manually run to import properties.json
configuration into the MongoDB database. After the migration script is run once, the properties.json
file will only be referenced by Itential Platform for the MongoDB connection properties, with Itential Platform referencing the database for all other configuration properties.
Note: Any desired changes to
properties.json
should be made before proceeding.
-
Enter the directory containing the Itential Platform migration script.
cd /opt/pronghorn/current/node_modules/@itential/pronghorn-core/migration_scripts
-
Run the migration script.
node migratePropertiesToDatabase.js
Click here for release versions 2023.1 and 2022.1
Key/value pairs after --userInputs
can be changed to match the RabbitMQ deployment in the 2023.1 and 2022.1 release versions.
# Option 1) RabbitMQ installed on Itential Platform server with default port.
node migratePropertiesToDatabase.js --userInputs protocol=amqp port=5672 hosts="localhost"
# Option 2) RabbitMQ installed on standalone server.
node migratePropertiesToDatabase.js --userInputs protocol=amqp port=5672 hosts="rabbitmq.test.com"
The properties.json
file will be updated during the migration script run to only contain the MongoDB connection properties, with all other configuration parameters stored within the default MongoDB database named pronghorn
. The migration script creates a backup of the original properties.json
file that will look similar to properties_b4b03d30-ad00-4f61-bd9e-7953968ef8c4.json
.
Migration Script Help Options
The migratePropertiesToDatabase.js
script has a --help
option that allows you to use the script in unattended mode with the --userInputs
option. The following example depicts the various help options available and briefly explains how they are used.
Figure 1: Help Options
Option to Ignore Schema Errors
The migration script also has an option that will ignore schema validation errors during migration. Run the migratePropertiesToDatabase.js
script, but this time add -i
to the parameters.
node migratePropertiesToDatabase.js -i
Start Itential Platform (First Time)
Once the migration script runs, start Itential Platform. Refer to Start Itential Platform (First Time) for more information.