NetXMS Support Forum

English Support => General Support => Topic started by: lindeamon on January 24, 2012, 08:16:55 PM

Title: exporting
Post by: lindeamon on January 24, 2012, 08:16:55 PM
hi,

i am using netxms 1.1.9 with postgre sql on a linux platform.
i have scripts in my script library and i have object tools and i have other places with configuration that i cannot export.
i have deleted all the nodes and now i want to export it.
i have invoked "nxdbmgr export netxms.db" and it worked fine but it exported all the idata and names and ip address that i did not want to export.
i have invoked "nxdbmgr init netxms.db" and stopped giving an error with sqlite.

what is the correct way to export the db ?

Lindeamon
Title: Re: exporting
Post by: lindeamon on January 25, 2012, 02:10:55 PM
hi,

i have "vacuumed" the DB and then i have invoked "nxdbmgr check" and it indeed got rid of every "idata" and every node that i have deleted but...
i think that the snmp log and the event log were not cleand.

what is the next step ?

Lindeamon
Title: Re: exporting
Post by: lindeamon on January 25, 2012, 03:29:32 PM
hi victor,

i have opened the DB and started cleaning everything that i did not wanted.
basically i want the "object tools", "script library", "agent config" and "event rules", all of the customized config that aren't exportable.
what will happen if i delete all the unwanted tables in the DB and leave those i want and do an import ? will it work ? will i have to do this with the same version of netxms and afterwords upgarde to later release.

Best Regards,
Lindeamon
Title: Re: exporting
Post by: Victor Kirhenshtein on January 25, 2012, 05:47:10 PM
Hi!

For successful import, you should keep tables, but just delete all content. Otherwise import will fail. You can delete all idata_* tables. You should do import using same version of NetXMS as you use for export.

Best regards,
Victor
Title: Re: exporting
Post by: lindeamon on January 25, 2012, 06:03:53 PM
thank you very much

Best Regards,
Lindeamon
Title: Re: exporting
Post by: lindeamon on January 26, 2012, 09:28:39 AM
hi victor,

should i delete what in the metadata table too ?

Best Regards,
Lindeamon
Title: Re: exporting
Post by: Victor Kirhenshtein on January 26, 2012, 10:00:07 AM
Hi!

No, if you delete metadata nxdbmgr will not be able to handle import file. Please also note that during import target database is cleared before import.

Best regards,
Victor
Title: Re: exporting
Post by: lindeamon on January 26, 2012, 10:13:43 AM
what do you meen by "cleared" ? everything is deleted or just customized info ?
what will happen if the only info i left is the info i have created meening i have cleared all the info that the setup and the program creates.
wanted to give you an example. lets say that i have cleared everything in the event_policy table leaving only the events i created,when i do an import it will delete the default rows created by the system and leave only what was imported ?

Best Regards,
Lindeamon
Title: Re: exporting
Post by: Victor Kirhenshtein on January 26, 2012, 10:29:26 AM
Everything is deleted, so you cannot import some data into existing database using nxdbmgr. Only full database import.

Best regards,
Victor
Title: Re: exporting
Post by: lindeamon on January 26, 2012, 10:33:41 AM
ok,
if i leave the defaults created by the software and only what i want it will be ok ?
won't it destroy the indexing and the "id's" and etc. that have been created automatically ?

Best Regards,
Lindeamon
Title: Re: exporting
Post by: Victor Kirhenshtein on January 26, 2012, 10:46:30 AM
Yes, leaving default data and data you need should be ok.

Best regards,
Victor
Title: Re: exporting
Post by: lindeamon on January 26, 2012, 10:55:55 AM
i have came accross var_name called "ServerID" in the config table.
when it is created ? what will happen if i leave it as is from the backed up server ? what will happen if i change it ?

Best Regards,
Lindeamon
Title: Re: exporting
Post by: lindeamon on January 26, 2012, 11:09:42 AM
hi victor,

the whole thing is too risky.
i have exported everything i could using the old console and what i could not export i am going to leave in the exported file.
in the new server i will open the DB and copy/paste the values,it seems more safe this way.
we have to have a normal and easy way to export everything we have created.

Best Regards,
Lindeamon