Migrating to a new server - can I take existing data?

Started by paul, June 02, 2019, 10:10:40 AM

Previous topic - Next topic

paul

If I want to move to a new server - both old and new are using NetXMS and Postgres - what are my options?

From the doco - there are options if the new DB is local and old DB is local and is connected to existing installation.
https://wiki.netxms.org/wiki/How_to_migrate_to_another_database

I know I can do export import of templates etc, but what about collected data - how do I transfer that across?


Victor Kirhenshtein

Hi,

it is not necessary that both databases are local for nxdbmgr migrate - both just should be accessible from the machine where you running migration tool. Usually it's better to run migration on destination (new machine) - then you can create correct netxmsd.conf for use by new server, copy netxmsd.conf from old server under different name or path, change it so that DBServer points to old database server, and run nxdbmgr migrate.

Best regards,
Victor

paul

Hi Victor - thanks for that.

The only trick is that I have POSTGRES on old machine and POSTGRES on new machine - both installed locally.

Running on the new machine - how would I do that?

Victor Kirhenshtein

In source config on new machine specify address of old server in DBServer. You may need to enable Postgres connections from new machine in pg_hba.conf on old machine.

Best regards,
Victor

paul


I assume that as an Option 2, I would be to do an export on the original server and do an import on the new server?

An extra step that might be seen as avoidable - but sometimes, getting a file from one server to another can be much simpler and quicker this way.

I have export working, so rather than opening up external connections - copying the SQLite export and importing is looking much easier.

Victor Kirhenshtein

Yes, export - copy - import  is another option. It may not work well on large databases though (because of space requirements, extra time to write export file, and on some systems hitting file size limit).

Best regards,
Victor

paul

Went with export / import. 1.4GB export file took about an hour to import - VM built as 4 core 12GB E2680 V4 CPU with all Flash storage - everything was local (iscsi to SAN). Included collected data.

Panicked when I started the console locally and pointed it at the new server - error.:(  Helps to start the NetXMS service first :)

Everything was perfect - the only thing I had to do in addition to the import was to copy the MIBS across.