01-06-2022 11:50 AM
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
Solved! Go to Solution.
01-06-2022 11:56 AM
01-06-2022 12:54 PM - edited 01-06-2022 12:57 PM
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!
01-06-2022 11:56 AM
01-06-2022 12:54 PM - edited 01-06-2022 12:57 PM
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!
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