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?
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 22.214.171.124.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.
copy run tftp://$tftpServer/NCS_Backup/$devName
<IQ>Address or name of remote host [$tftpServer]?<R>""
<IQ>Destination filename [NCS_Backup/$devName]?<R>""
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.
copy run tftp://$tftpServer/NCS_Backup/$devName<IQ>Address<R>$tftpServer<IQ>Destination<R>$devName
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:
copy run tftp://10.10.10.10/NCS_Backup/Switch-Name.domain.comAddress10.10.10.10DestinationSwitch-Name.domain.com
terminal width 0
copy run tftp://10.10.10.10/NCS_Backup/Switch-Name.domain.com