RE: Need router config Collector/backup tool

From: Patrick Hollowell (patrick.hollowell@peak-10.com)
Date: Mon Nov 12 2001 - 12:47:37 EST


Michuki:

Just write a quick script. For IOS-based routers, use this command
line:

/usr/local/bin/snmpset -c <RW community> <router hostname/IP>
.1.3.6.1.4.1.9.2.1.55.<TFTP IP octet1>.<octet 2>.<octet 3>.<octet 4>
string <path/file on TFTP server to save file to>

For example:

snmpset -c secretcommunity router1.myisp.com
.1.3.6.1.4.1.9.2.1.55.172.16.41.58 string configs/router1.cfg

will upload running-config on router1.myisp.com to 172.16.41.58 as
configs/router1.cfg.

For Catalyst switches running CatOS:

/usr/local/bin/snmpset -c <RW community> <switch hostname/IP>
.1.3.6.1.4.1.9.5.1.5.1.0 s <TFTP server's IP>
/usr/local/bin/snmpset -c <RW community> <switch hostname/IP>
.1.3.6.1.4.1.9.5.1.5.2.0 s <path/file on TFTP server>
/usr/local/bin/snmpset -c <RW community> <switch hostname/IP>
.1.3.6.1.4.1.9.5.1.5.4.0 i 3

Note: The snmpset syntax is for the net-snmp utilities available from
net-snmp.org. If you use another snmpset utility, your syntax may need
to change.

I also use the following lines to tar/gzip the directory with all my
backup configs in it, once a day.

set _fn = `/usr/bin/date +%m%d%y-%H%M%S`.tar
cd /usr/local/tftp/configs
/usr/sbin/tar cf /usr/local/backup_config/archive/$_fn *
/usr/bin/gzip /usr/local/backup_config/archive/$_fn

Hope I helped you out.

Patrick

-----Original Message-----
From: Michuki Mwangi [mailto:Michuki@swiftkenya.com]
Sent: Monday, November 12, 2001 5:39 AM
To: cisco-nsp@puck.nether.net
Subject: Need router config Collector/backup tool

Hello,

Can anyone point me to a tool/utility/script that i can use to automate
my
Cisco routers config collection/backup process using SNMP or TFTP.

Thanks.

Michuki



This archive was generated by hypermail 2b29 : Sun Aug 04 2002 - 04:12:54 EDT