cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1750
Views
0
Helpful
4
Replies

NCS Prime 2.2 Export Device Configurations

David Parker
Level 1
Level 1

I'm trying to figure out how to obtain a copy of all our device configurations from the configuration archive inventory. I can drill down into each device and export one at a time but this is extremely inefficient. How do I go about exporting them all?

 

Thanks,

David

4 Replies 4

David Parker
Level 1
Level 1

I'm guessing this can't be done. I know we used to be able to accomplish this in LMS. I'm not sure why the developers would prevent customers from exporting their own configs if that is the case. I'm guessing I could create a template to copy local configs to a tftp server. I tried looking at the tar.gpg file that gets dumped with the system backup in order to extract the configs but I can't decrypt it. The issue we are having is that our NCS Prime is no longer supported. We aren't buying a new appliance because we are migrating to APIC-EM, but it still hasn't shipped. Recently our Prime appliance quit functioning but I was able to recover it without support. I'd really like to obtain all our configs to know we have good backups as well as using them for planning to replace old switches and routers. 

You can get bulk sanitized or unsanitized configs from the API. See /webacs/api/v1/data/BulkSanitizedConfigArchives endpoint in 3.1. Since 3.0 you can retrieve individual device configs, too, again, as sanitized or unsanitized. For example, the /webacs/api/v1/op/configAchiveService/extractUnsanitizedFile endpoint can be used on individual devices.

 

See the NBI docs for details.

I'm running 2.2.0.0.158. Our appliance won't support 3.x

 

I created a script to handle this but I don't believe the modes function correctly in Prime 2.2. When I deploy this to a single device and preview the CLI it looks perfect. But submitting the job just fails with an Error: Connection timed out. I've experimented with specifying modes for trivial cmds but jobs always time out when specifying enable and/or interactive modes.

 

#MODE_ENABLE
#INTERACTIVE

copy run tftp://$tftpServer/NCS_Backup/$devName
<IQ>Address or name of remote host [$tftpServer]?<R>""
<IQ>Destination filename [NCS_Backup/$devName]?<R>""

#ENDS_INTERACTIVE
#MODE_END_ENABLE

 

 

Progress because I learned that INTERACTIVE mode will only work if you enter the first word in the display. I guess it gets stuck at the first space. I don't believe the user guides mention this behavior. The job just aborts with a timeout error if you don't stop at a word boundary.

 

Template:

#MODE_ENABLE
#INTERACTIVE
copy run tftp://$tftpServer/NCS_Backup/$devName<IQ>Address<R>$tftpServer<IQ>Destination<R>$devName
#ENDS_INTERACTIVE
#MODE_END_ENABLE

 

Now the job completes successfully except for the fact that the config doesn't actually get transferred to the tftp server. If I paste the command that is displayed in the CLI Preview into a terminal session, it does copy the config to the tftp server. Below is the job output:

 

Success
configlet:
#MODE_ENABLE
#INTERACTIVE
copy run tftp://10.10.10.10/NCS_Backup/Switch-Name.domain.comAddress10.10.10.10DestinationSwitch-Name.domain.com
#ENDS_INTERACTIVE
#MODE_END_ENABLE
response:
terminal width 0
config t
exit
copy run tftp://10.10.10.10/NCS_Backup/Switch-Name.domain.com 
config t

 

Getting Started

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 community: