08-04-2017 07:03 AM - edited 03-01-2019 03:56 AM
Hello experts,
I need to figure out how to restore service instance.
Let's say I have a device config with service metadata in CDB.
The service instance which created the config is lost for some reason, but I know what service command operator had entered.
Use of sync-from is prohibited in this restoration process since device may have out-of-policy configs.
Here is my plan.
1)Backup the device config with metadata using "copy devices device IOS IOS-bkup" and commit no-networking.
2)Enter same service command that created the lost service instance eg)"services test foo parameter bar" and commit no-networking.
*This will restore original service instance but service metadata of IOS is no longer original.
3)Delete device whose metadata was disturbed in step2.("no devices device IOS")
4)Restore device with "rename devices deivce IOS-bkup IOS" and commit no-networking.
*This will restore original device config with original service metadata
Now I have original service config, oririnal device config with original metada, so I should be ok.
But further research lead me to this discussion which says I should also be careful with reverse diff.
https://communities.cisco.com/message/243153#243153
Although I know what reverse diff does, I don't know where it is.
So my question is, how can I restore reverse diff in this scenario?
Is backup/resotre device config with service metadata good enought to restore reverse diff?
Or is something more complex and I should abandon my plan?
Your comment would be very much appreicated.
Best regards,
Takeru Nomura
Solved! Go to Solution.
08-07-2017 12:16 AM
Hello Bilal,
Thank you for your comment.
In fact, what I am trying to do is to figure out how to rollback from/after service reconciliation.
Original device config and service instance are deleted as part of reconciliation process, and I need to bring them back.
Using real-time config is not an option here since it has out-of-policy configs that were not part of original device config.
Though "ncs-backup" provides full backup and restore service, it's too much for backup and restore one device.
I was able to figure out how to backup & restore device config with metadata using copy/rename commands.
Last remaining piece of the puzzle was service instance internal data such as reverse diff.
My concern was that simply re-entering same service config, or copying/renaming service instance won't bring those internal data to its original state.
My colleague just pointed me to "ncs_load" command.
Using "ncs_load -p /services", I was able to see private data attached to service instance.
So answers to my question would be:
So my question is, how can I restore reverse diff in this scenario?
Is backup/restore device config with service metadata good enough to restore reverse diff?
Service instance has private data.
They include diff-set, device-list, latest-commit-params and latest-u-info. (and few more operational data)
These private data are not restored by backup/restore device config with metadata.
Or is something more complex and I should abandon my plan?
Maybe, I should research if "ncs_load -l" helps.
I will test in my setup if I can use "ncs_load" and "ncs_load -l" for backup and restore service instance including its private data like reverse diff.
Best regards,
Takeru Nomura
08-06-2017 06:35 PM
Use of sync-from is prohibited in this restoration process since device may have out-of-policy configs.
My thinking is that the deed has already been done, on the network elements. So why not bring the real-time config into NSO. Given that the policy has already been violated.
Has service-reconciliation, covered in-detail in the guides, considered for the above task. My first reading seems to indicate that it should help.
08-07-2017 12:16 AM
Hello Bilal,
Thank you for your comment.
In fact, what I am trying to do is to figure out how to rollback from/after service reconciliation.
Original device config and service instance are deleted as part of reconciliation process, and I need to bring them back.
Using real-time config is not an option here since it has out-of-policy configs that were not part of original device config.
Though "ncs-backup" provides full backup and restore service, it's too much for backup and restore one device.
I was able to figure out how to backup & restore device config with metadata using copy/rename commands.
Last remaining piece of the puzzle was service instance internal data such as reverse diff.
My concern was that simply re-entering same service config, or copying/renaming service instance won't bring those internal data to its original state.
My colleague just pointed me to "ncs_load" command.
Using "ncs_load -p /services", I was able to see private data attached to service instance.
So answers to my question would be:
So my question is, how can I restore reverse diff in this scenario?
Is backup/restore device config with service metadata good enough to restore reverse diff?
Service instance has private data.
They include diff-set, device-list, latest-commit-params and latest-u-info. (and few more operational data)
These private data are not restored by backup/restore device config with metadata.
Or is something more complex and I should abandon my plan?
Maybe, I should research if "ncs_load -l" helps.
I will test in my setup if I can use "ncs_load" and "ncs_load -l" for backup and restore service instance including its private data like reverse diff.
Best regards,
Takeru Nomura
08-07-2017 01:26 AM
I am closing this discussion as my colleague provided me answers offline as I already posted.
I will open new discussion if any question regarding "ncs_load" arises.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the NSO Developer community: