Cisco: Configuration save

Cook, Garry GWCOOK at mactec.com
Thu Feb 5 23:26:54 CET 2004


Gary MacMinn wrote:
> Garry,
> 
> Could you post the shell script you wrote to save the Cisco configs
> please? I've been thinking of doing the same thing but if someone has
> already got a working solution, why reinvent it.
> 

OK, but don't say I didn't warn you... There's a reason that I want to
use a Nagios plugin to do this for me. I'm still hoping for some
input/feedback on my original email...

There are actually three scripts, tftpbak_public is a shell script that
uses snmp to grab the configs from Cisco devices. All of the variables
that you'll want to replace are listed <in angle brackets>. The code for
IOS and CatOS switches will either need to be copied for each device
that you want to grab, or put in a loop that calls a file where you
store the name, ip, etc. of each device. I had planned to do this
myself, but never got a round tuit. These are some of the first shell
scripts that I ever wrote, about 3 years ago, so they aren't very fancy.

Tftpbak_public also calls two expect scripts, which will telnet/login to
HP 4000 & 4100 series switches and force them to send their configs. If
you don't use HP switches, you'll need to comment out or delete the code
that calls the expect scripts.

Have fun!

Garry W. Cook, CCNA
Network Infrastructure Manager
MACTEC, Inc. - http://www.mactec.com/
303.308.6228 (Office) - 720.220.1862 (Mobile)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tftpbak_public
Type: application/octet-stream
Size: 4692 bytes
Desc: tftpbak_public
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040205/937c0a35/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tftp4100_public
Type: application/octet-stream
Size: 3709 bytes
Desc: tftp4100_public
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040205/937c0a35/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tftp4000_public
Type: application/octet-stream
Size: 4507 bytes
Desc: tftp4000_public
URL: <https://www.monitoring-lists.org/archive/users/attachments/20040205/937c0a35/attachment-0002.obj>


More information about the Users mailing list