NetXMS Support Forum

English Support => General Support => Topic started by: adimitrov on February 02, 2017, 10:52:06 AM

Title: Migrating NetXMS database on New NetXMS server
Post by: adimitrov on February 02, 2017, 10:52:06 AM
Hello team,

I am planing on changing my netxms server with new one. I have the new one configured and ready to go, but first i need the database from the old server. My original plan was to dump the base (it is mysql database) and migrate it to the new server, until i found a topic here in the forum. My new plan is.

Old server version is 2.0.7.
New server version is 2.0.8.

1. Upgrade the old server to 2.0.8. and upgrade the database.

1. Stop netxmsd on old server
2. Export database using nxdbmgr:

nxdbmgr export export_file

4. Create and initialize new database as usual (this is already done)
5. Import data using nxdbmgr:

nxdbmgr import export_file

6. Run netxmsd on new server

Any advice on this will be appreciated.

Best Regards,
Adrian
Title: Re: Migrating NetXMS database on New NetXMS server
Post by: tomaskir on February 02, 2017, 11:45:12 AM
nxdbmgr has a migrate command, I suggest using that :)

As a bonus, it has the option to not migrate collected data, so if you dont need those, the migration will be MUCH faster.
Title: Re: Migrating NetXMS database on New NetXMS server
Post by: adimitrov on February 02, 2017, 12:13:48 PM
Hey Tomas ,

Thanks for the fast response.

So it is better to use

migrate <source> | Migrate database from given source

which means:

nxdbmgr migrate <IPaddressOftheOldMachine>

Is it that simple or i need to follow this : https://wiki.netxms.org/wiki/How_to_migrate_to_another_database

I actually need the data and the database is about 170GB so i guess it will be a slow process.

Best Regards,
Adrian
Title: Re: Migrating NetXMS database on New NetXMS server
Post by: tomaskir on February 02, 2017, 12:32:12 PM
Yes, follow the wiki article.

A 'nxdbmgr migrate' will still be faster than sql dump/import or nxdbmgr export/import.
Title: Re: Migrating NetXMS database on New NetXMS server
Post by: adimitrov on February 02, 2017, 01:20:40 PM
Thanks for the help !

Best Regards,
Adrian