cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
860
Views
20
Helpful
2
Replies

Read CDB offline from backup

tsiemers1
Spotlight
Spotlight

Does NSO have any built in methods to read the CDB from a backup? Just did a ned migration and forgot to take a backup of the device templates before I deleted the old ned. Which in turn removes the template config....

 

So instead of doing the normal spin up temp NSO, restore backup, grab missing config, re-apply. I was wonder if the CDB can be read offline with a backup copy of the cdb folder

 

cdb

--A.cdb

--C.cdb

--O.cdb

--S.cdb

 

I see this python package but not sure if it would apply to NSO's cdb structure.

 

https://github.com/acg/python-cdb

2 Accepted Solutions

Accepted Solutions

vleijon
Cisco Employee
Cisco Employee
That is not the same CDB, no.

The ncs binary takes the option --cdb-debug-dump now with the caveat that this is a debug command and that there is no guaranteed stability in the output format and all of that you can try it and see if the output is what you need!

View solution in original post

Nice! That was it, only the ncs cli command were needed. Not a full blown spin up and restore.

 --cdb-debug-dump Directory
     Dumps information about CDB files in Directory as text to stdout
     (runs standalone and does not require a running NCS).

After expanding the backup,  just pointed the above command at the  cdb directory within the backup.

 

ncs --cdb-debug-dump cdb/ >> cdb_dump.txt

 

Then just grep out the template xpath:

root@nsodev5:/home/nsodev/nsobackup# cat cdb_dump.txt | grep /ncs:devices/template

Then within the debug dump I found the old template data. Thanks!

View solution in original post

2 Replies 2

vleijon
Cisco Employee
Cisco Employee
That is not the same CDB, no.

The ncs binary takes the option --cdb-debug-dump now with the caveat that this is a debug command and that there is no guaranteed stability in the output format and all of that you can try it and see if the output is what you need!

Nice! That was it, only the ncs cli command were needed. Not a full blown spin up and restore.

 --cdb-debug-dump Directory
     Dumps information about CDB files in Directory as text to stdout
     (runs standalone and does not require a running NCS).

After expanding the backup,  just pointed the above command at the  cdb directory within the backup.

 

ncs --cdb-debug-dump cdb/ >> cdb_dump.txt

 

Then just grep out the template xpath:

root@nsodev5:/home/nsodev/nsobackup# cat cdb_dump.txt | grep /ncs:devices/template

Then within the debug dump I found the old template data. Thanks!