Difference between revisions of "How to migrate to another database"

From NetXMS Wiki
Jump to navigation Jump to search
(Created page with "NetXMS database manager (nxdbmgr) provides database migration option. To perform database migration follow these steps: 1. Create a copy of existing '''netxmsd.conf''' ('''ne...")
(No difference)

Revision as of 16:23, 12 November 2015

NetXMS database manager (nxdbmgr) provides database migration option. To perform database migration follow these steps:

1. Create a copy of existing netxmsd.conf (netxmsd_old.conf in this example).

2. Create new database.

3. Initialize new database:

 nxdbmgr init /opt/netxms/share/netxms/sql/dbinit_pgsql.sql

Please note, that there are different files for different database types, in this example - dbinit_pgsql.sql is for PostgreSQL.

4. Adjust netxmsd.conf - change DBDriver, DBName, etc. to match new database.

5. (optional) Run "nxdbmgr check" to verify connectivity to new database.

6. Stop NetXMS server.

7. Run

 nxdbmgr migrate netxmsd_old.conf

This will load data from old database (using credentials in netxmsd_old.conf) and migrate it into new one (as configured in netxmsd.conf).

8. Start NetXMS server - it should run on new database.