07-11-2017 02:30 PM - edited 03-01-2019 03:55 AM
Hi,
Looking for a utility to compare the cdb’s in NSO before and after upgrade. Is there a utility that NSO provides for this or in general compare the given two cdb’s.
Thanks,
Lakshman.
07-11-2017 11:28 PM
NSO upgrade shouldn't necessarily result in CDB changes. Especially with respect to device and service configuration. This is because Device-Models (part of the NEDs) and Service-Models (part of the service packages) do not change across an NSO upgrade.
Is the question more regarding taking two snapshots of the CDB (for example backups) and then comparing the delta?
07-12-2017 10:13 AM
Hi Bilal,
Yes the question was on how to compare the snapshots of CDB. Is there a documentation which details how this can be done.
Thanks,
Lakshman.
07-12-2017 08:51 PM
I'm not sure if the cdb data on disk can be read directly via some other tool.
CDB files need to be loaded up into NSO before they can be read/written to. Also, don't know if a NSO node can load up more than one CDB snapshot (ncs-backup --restore) at a time.
See if others on the forum have more insight otherwise perhaps raise a ticket for this to be considered as a new feature request.
07-13-2017 11:58 PM
You can save the DB with ncs_load. This creates an xml file with the contents of the DB. I you then load from such a file, you can see the diff with commit dry-run.
Above works if the schema of the DB did not change between when you saved the snapshot and the current state, so if you are comparing 2 old states, or the schema changed such that you cannot load the old snapshot, you could compare the saved snapshots directly outside of NSO.
For that purpose you could use xmllint to format nicely and then diff, Also are several tools for diffing xml. (e.g xmldiff is a free one) - don't know which is best.
07-26-2017 04:29 PM
Thanks Stefano. Will give it a try.
Thanks.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide