cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1047
Views
0
Helpful
5
Replies

NSO compare cdb

lmukkama
Level 1
Level 1

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.

5 Replies 5

alam.bilal
Cisco Employee
Cisco Employee

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?

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.

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.

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.

Thanks Stefano. Will give it a try.

Thanks.