[c-nsp] Automated configuration backups

Mike Andrews mandrews at bit0.com
Tue Apr 18 13:06:09 EDT 2006


On Tue, 18 Apr 2006, Bartosz Piec wrote:

> I would like to do an automated backup of router's configuration. How
> can I do this? Everything that I've found was to use rsh command. Are
> there any other ways? Maybe some tool from Cisco?
>
> I've got Cisco 2821 and want to make backups from Linux box.


Everyone mentioned that installing Rancid is one way. :)

Another is to let the router do it for you.  Put something like this in 
your config, so that any time you save the config or once a day, it'll 
drop a copy on your Linux box's TFTP server:

archive
  path tftp://192.168.1.2/router-confg.txt    ! can be ftp, rcp, scp, sftp also
  write-memory
  time-period 1440

Another way to tftp the config, if you have net-snmp in your Linux distro:
(Yeah, it's a depricated MIB... the newer MIB does ftp, rcp etc but needs 
a a few more lines of shell scripting or Perl to pull it off...)

snmpset -v 1 192.168.1.1 routerwritecomm .1.3.6.1.4.1.9.2.1.55.192.168.1.2 s router-confg.txt

or even this (yuck!):

curl -u user:pass http://192.168.1.1/level/15/exec/-/show/startup-config/CR > router-confg.txt




Mike Andrews  *  mandrews at bit0.com  *  http://www.bit0.com
It's not news, it's Fark.com.                  Carpe cavy!


More information about the cisco-nsp mailing list