Welcome back to our complaint of the week series (we had a bit of a hiatus…I guess no complaints, eh?).
We received a new complaint that was interesting: “can I move a catalog object between two netTerrain systems?”
- By ‘catalog object’, we don’t mean the actual inventory or instances of assets you have in your network mapping, outside plant or DCIM (Data Center Infrastructure Management) project. Instead by catalog object we usually mean the type definition. For example, a device card or rack type used in your DCIM software’s catalog. A catalog object could also be a type that you use in your network documentation catalog or some outside plant type, such as an enclosure type, splice, etc.
- By systems, we mean two different netTerrain server installations altogether…
Is moving a catalog object between two systems even possible…and why would you want to?
There could be many use cases, but one that immediately pops into my mind is that you may have a test or lab instance where you did some work on your catalog and then you need to move them over to production (or, maybe, you are a reseller and you are doing work for a client and need to send them some objects). Also, this scenario could be useful in instances where you need to comply with certain mandates such as PCI or SOX and the catalog definitions are managed by one team on one server while the actual project, that uses the same catalog, is in a different system.
You don’t want to redo all the work right? Well, the bad news is this: we don’t yet have a magic button to do this. The good news is that we can still help.
So here’s how we do it: first you will need a magic SQL script that you request from us. If you are moving from 8.x to 8.x you will be fine. If it’s between different major versions you better reach out to us (like from 8.X to 7.X) — but chances are you will be moving stuff between the same versions or two versions within the same major release (such as from 8.1 to 8.1 and so on).
You need to run the script where netTerrain is installed. It is convenient to have SQL server management studio (SSMS) on the source server (where the original types are). With the script in hand, open SSMS and paste it onto a new query pointed at the netTerrain database.
SQL server management studio:
Now you need to change some information in the script:
First, you will need to add an output folder.
For my example, I setup a folder on the C drive called ‘SQLoutput’. Then you need to set the path to the netTerrain images. The netTerrain images folder is under the main netTerrain application folder on the server.
So, here it gets a bit hairy, which is why we started with the bad news…then again, better to have an option to do this than to spend days recreating the catalog by hand, right? As a next step you need to enter the ID or IDs of the devices or cards you want to export.
To find these IDs you need to look them up in the netTerrain catalog:
- Please note these IDs are unique and not reused. Also, there is no need to export all the objects from one catalog to another. Just compare catalogs and see what is their highest common ID. Then you can export any objects that are missing from the catalog where the new objects need to be imported. This only matters if you war trying to export a large set of objects from one catalog to another.
Now it’s time to execute the query.
Easy, peasy.
Just execute the script from SSMS and then check the output folder:
OK. This gets a little tricky so pay attention:
Open the root folder and then the images sub-folder.
Cut these folders (there may be others)
Then paste them one level up so you end up with all the files in one folder.
Next, select everything and ZIP it up. If you get an error regarding empty directories you can just ignore it.
Now, I prefer to rename the ZIP file so it has some meaning (for example: “devicesoutput.zip” or something), but it’s not required.
Next, go to your other netTerrain system and import it by going into the catalog and pressing ‘Import’.
Select the ZIP file and Import.
If the log has errors, you can open it for inspection, but normally everything will run well and without any problems.
To check out if things really ran smoothly you may want to inspect your catalog: sort your catalog by ID and look for the imported objects. You may need to press the ID field 2 times to sort from highest to lowest.