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?”
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:
Now it’s time to execute the query.
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.