cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3429
Views
10
Helpful
6
Replies

NSO config backup

sutrehan
Cisco Employee
Cisco Employee

Hi all,

 

We have a requirement for DB backup and restore.

 

Exploring the forum I found 2 options

1) ncs-backup: This is applicable only for system-install. We are using local-install.

2) ncs_load: This take the config backup in cli/xml format. We may not be able to use this since there is config sequence dependency in our case.

 

My query is that can we do the following for db backup:

1) Take backup of the cdb files.

2) Stop the nso

3) Replace the cdb with the backed-up files.

4) Start nso again.

 

Thanks

6 Replies 6

vleijon
Cisco Employee
Cisco Employee

Yes you can, that is probably the easiest way to do it, of course the packages have to match as well.

 

You can look inside the ncs-backup script to see how it works.

Thanks for the response.

Can you elaborate more on this point "packages have to match as well".

 

Scenario 1:

a) Consider a scenario where we have a nso version x, where we have a package A. We take a CDB backup here.

b) In nso version y, we decided to add another package. Now can we start the version y with the CDB backup taken from version x ?  Also can vice-versa be done ?

 

Scenario 2:

a) Consider a scenario where we have a nso version x, where we have a package A. We take a CDB backup here.

b) In version x.1(minor change), we change something in existing package A. Now can we start the version x.1 with the CDB backup taken from version x ?  Also can vice-versa be done ?

 

Thanks

Sumit

 

 

So, if you have a different system, with different models, you will force a schema upgrade on the database. This follows the regular schema upgrade rules – which means that it will sometimes work and sometimes not depending on exactly what changes you make.

For an overview of which upgrades are allowed see the updates rules for YANG: https://tools.ietf.org/html/rfc7950#section-11 this similar to doing a packages reload on a running system.

Special rules apply if you go from 4.x to 5.x, but that doesn’t seem to be the case here.

As per my understanding, you are referring to yang model related changes. 

So if the yang model changes are not compatible, what is the behaviour in case we copy the CDB database files and restart the nso ? 

Will entire config restore fails or the config related to that model or subtree fails ?

 

Thanks

Sumit

Hi Sumit,

Yes, it is about the model changes. You can change the code as much as you want.

If your upgrade transaction fails, NSO will not start. NSO will not run with a database that does not comply with its schema. You can write your own upgrade components if needed.

--Viktor

swarudka
Cisco Employee
Cisco Employee

Can we import CDB in NETSIM running in docker container
Can anyone pls help to do this