IOS Configuration Archive

In my January IP Corner article, Keep Track of Router Configurations with Configuration Archive, you'll find in-depth description of the IOS Configuration Archive feature, ways to integrate it with HTTP servers and enhance its functionality with IOS Embedded Event Manager.

7 comments:

Roman said...

Hello, Ivan.
First thank you for your blog and for your articles. You do a great work.
I want to ask you to grant for me the permission to translate your article "Keep Track of Router Configurations with Configuration Archive" into russian and publish it in cisco_ru (http://community.livejournal.com/cisco_ru/profile) - russian Cisco LiveJournal community, in my blog (http://romik-g.livejournal.com/) and on http://www.opennet.ru/ site, which is one of the largest russian system and network administration info server.

Rob said...

I copy my configs to a tftp server, and I've just realised that the archived configs (archive.cfg-1, archive.cfg-2 etc) are overwritten when the configs are backed up after the router reloads for any reason.

Ivan Pepelnjak said...

As I wrote in my article, the counter is reset after each reload (see the first note on the first page). If you want to make the file names unique, include the date in the archive path (Table 1 on the first page of the article).

Anonymous said...

Great trick, but I'm having problems with IOS will not save a config when I specify a path.
Not on a router but on a switch.

%scp: error: unexpected filename: /path/config

%Error writing scp://scpuser@hostname//path/config (Permission denied)

but a path with only "config" will work.. Strange stuff :)

Ivan Pepelnjak said...

You have a double // in the URL (...//path...). The SCP server might interpret that as a potential attack.

Anonymous said...

Thanks Ivan for quick respons :)

But the dobbelslash is actually added by the "wizard"..

switchname#copy run scp:
Address or name of remote host []? zzz.xxx.yyy.nnn
Destination username [switchname]? scpuser
Destination filename [switchname-confg]? /path/config
Writing /path/config
Password:
%scp: error: unexpected filename: /path/config


%Error writing scp://scpuser@zzz.xxx.yyy.nnn//path/config (Permission denied)

It makes no difference if I use copy run "scp://scpuser:password@zzz.xxx.yyy.nnn/path/config" or "//path/config"

Found something on this page:
http://www.cisco.com/en/US/docs/switches/lan/catalyst6500/ios/12.2SXF/hybrid/release/notes/ol_4563.html

###
When you connect to a Cisco IOS Secure Copy (SCP) server, and then you specify a full path consisting of one or more directories for the destination-url parameter in the copy scp:destination-url command, the following message is displayed:
%scp: error: unexpected filename: /tmp/test %Error writing
scp://root@172.18.124.187//tmp/test (Permission denied)


Workaround: Specify the destination IP address in the command. The file will be placed in the top level of the destination file directory. Move the file internally into the desired directory.

This problem is resolved in Release 12.2(18)SXF6. (CSCsb62045)
####
Testing this on this box:
Cisco IOS Software, C3560 Software (C3560-IPBASEK9-M), Version 12.2(40)SE, RELEASE SOFTWARE (fc3

geniesis said...

Hi,

You go through storing the configs on a windows http server. However i'm trying to work out how to do this on a linux server using apache and a php script to receive the config and store it in a mysql database.

Have you tried this type of setup? As it seems that the cisco router sends half the config and then stops. I have tried searching for someone else thats tried this scenario but have come up empty handed. It would be appreciated if you had any insight into this problem.

Thanks

Ivan Pepelnjak, CCIE#1354, is the chief technology advisor for NIL Data Communications. He has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced technologies since 1990. See his full profile, contact him or follow @ioshints on Twitter.