04-28-2008 10:06 PM
Are there any scripts avilable to take the backup on cisco switch\Router.Show run config bakup is require
04-29-2008 03:42 AM
HI, [Pls Rate if HELPS]
Script provided on how to perform a periodic back up of a file in router's flash to an FTP server:
event manager applet backup-crl
event timer watchdog time 86400 maxrun 4294967295
action 1.0 cli command "enable"
action 2.0 cli command "copy flash:/iosca.crl ftp://username:passwd@a.b.c.d/" pattern "a.b.c.d"
action 3.0 cli command "a.b.c.d" pattern "iosca.crl"
action 4.0 cli command "iosca.crl"
action 5.0 syslog msg "FTP backup successful"
Refer Link below for more such EEM Scripts Posted:
http://forums.cisco.com/eforum/servlet/EEM?page=main
Hope I am Informative.
Pls Rate if HELPS
Best Regards,
Guru Prasad R
04-29-2008 04:08 AM
Thanks,I have more 100 switches and few routers and i am looking for automatic conf backup through scripts. If you have some info please send it across
04-29-2008 06:36 AM
Windows
http://www.blindhog.net/cisco-automatic-configuration-backup/
http://www.freedownloadmanager.org/downloads/cisco_config_backup_software/
Linux RANCID
http://www.shrubbery.net/rancid/
That should give you a start
04-29-2008 08:28 AM
I don't know if it's the best way, but I have ours setup with a simple expect script. The script is setup to run as a job on the server every night at 1:00am. The script basically telnets to the switches and routers throughout the network and copies the configuration via tftp to a server and the tftp root directory on that server is setup as a website that can be accessed via our intranet from our admin network. Here is a sample of the expect script I'm using for our gear;
#!/usr/bin/expect
# ACCESSW01
# Backup script for ACCESSW01
#
set timeout 15
set name "username"
set pass "password-for-user"
spawn telnet ACCESSW01
expect "sername:"
send "$name\r"
expect "assword:"
send "$pass\r"
expect "HQ-ACCESSW01#"
send "copy start tftp\r"
expect "ddress or name of remote host []?"
send "XXX.XXX.XXX.XXX\r"
expect "?"
send "\r"
expect "HQ-ACCESSW01#"
send "exit\r"
expect eof
It is a rather simple approach although probably not best practice as the username and password are stored in plain text on a server. For a little added security I setup the user on our ACS server to only be able to run the command listed (copy start tftp) so that if the account were compromised the only command they could run is that. I have access-lists in place that denies tftp traffic to the outside so theoretically they could copy the configuration to an internal host which so far has not been an issue for us. Like I said before this is probably not the best solution but it works.
10-15-2010 06:19 AM
There are a bunch of useful scripts at http://cosi-nms.sourceforge.net/alpha-progs.html. I have used Ciscocmd in the past with good results.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide