How to migrate to another database

From NetXMS Wiki
Revision as of 18:23, 12 November 2015 by Victor (talk | contribs) (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...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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.