11-23-2005 06:16 AM
Hi,
Is there any way I can automate the backing up of my MDS 9120 and 9216 configurations. Currently when a change is made I manually use the Fabric Manager to tftp the start up and running configs to a tftp server. What I vision is a script where when log I into the switch it runs automatically and backs up all the fabric switches to the tftp server or something simular.
Thanks
Sid
11-23-2005 06:55 AM
Hi,
may be RME does something like You want. Try check - http://cisco.com/en/US/products/sw/cscowork/ps2073/index.html
11-23-2005 07:21 AM
You can use scheduler command in CLI to setup a set time and day to copy the running or start-up config to TFTP or many choices. See scheduler commands in user guides. very easy to use. Scheduler can automate many funtions, have fun.
11-23-2005 07:32 AM
Hi Sid,
If you are using v 2.x of SANos you will be able to use the job scheduler. I have not tested this method at all but it should work.
switch# conf
switch(config)# scheduler enable
switch(config)# scheduler job name backup_configs
switch(config-job)#copy run
tftp://location.of.your.tftp.server.com/switchname.conf
switch(config)# scheduler schedule name daily_config_backup
switch(config-schedule)# job name backup_configs
switch(config-schedule)# time [whenever you want it to happen]
If this does not work or you dont have v2.x of sanos you could always setup a cron job on a unix/linux machine that ssh's to the switch using ssh keys and simply ....
unixhost$ ssh switch show run > switch-config.cfg
The above is the method that I am using at the moment on a 16 switch environment which is still using v1.x sanos.
If you require some info on how to do this just let me know.
Cheers
Andrew
11-24-2005 07:08 AM
Hello Sid Bartle,
There are two things you need to be aware of :
1 ) Your ftp server should not do authentication and authorization for the switch, otherwise scheduler does not work.
2) To copy the running configuration to a ftp server, you should use the following configuration :
MDS# copy system:running-config ftp://
without "system" keyword does not work.
I made a test for you, uploaded the running config to a tftp server and it worked well.
Here is my config :
# ***** Begin MDS SCHEDULER CONFIG *****#
scheduler enable
scheduler logfile size 16
scheduler job name ekin
copy system:running-config tftp://1.1.1.1
end-job
scheduler schedule name hakan
job name ekin
time start 2005:11:23:20:27 repeat 20:27:0
# ***** End MDS SCHEDULER CONFIG *****#
Arthur# sh scheduler job name ekin
Job Name: ekin
--------------
copy system:running-config tftp://1.1.1.1
==============================================================================
Arthur# sh scheduler schedule name hakan
Schedule Name : hakan
---------------------------
User Name : admin
Schedule Type : Run every 20 Days 27 Hrs 0 Mins
Start Time : Sun Nov 23 20:27:33 2005
Last Execution Time : Yet to be executed
-----------------------------------------------
Job Name Last Execution Status
-----------------------------------------------
ekin -NA-
==============================================================================
Arthur# sh scheduler schedule name hakan
Schedule Name : hakan
---------------------------
User Name : admin
Schedule Type : Run every 20 Days 27 Hrs 0 Mins
Start Time : Sun Nov 23 20:27:33 2005
Last Execution Time : Sun Nov 23 20:27:33 2005
Last Completion Time: Sun Nov 23 20:27:33 2005
Execution count : 1
-----------------------------------------------
Job Name Last Execution Status
-----------------------------------------------
ekin Success (0)
==============================================================================
Arthur# sh scheduler log
Job Name : ekin Job Status: Success (0)
Schedule Name : hakan User Name : admin
Completion time: Sun Nov 23 20:27:33 2005
--------------------------------- Job Output ---------------------------------
`copy system:running-config tftp://1.1.1.1`
Trying to connect to tftp server......
|
TFTP put operation was successful
==============================================================================
And It successfully uploaded the running config to the tftp server.
I hope this helps.
Cheers,
Hakan.
11-24-2005 10:04 PM
Hakan,
Thanks for the help, much appreciated.
Sid
11-24-2005 10:52 PM
Hakan,
Is it posible to have the switch create unique names for the save. Like %time%_%date%_%switchname%_cfg.txt.
1645_251105_SW-1_cfg.txt
I could run a script on the tftp server to change the name but I would like to keep thing as simple as posible.
11-25-2005 12:48 AM
Yes, it is possible.
Issue the commmand as given below :
copy system:running-config tftp://1.1.1.1/1645_251105_SW-1_cfg.txt
Thanks,
Hakan.
11-25-2005 01:45 AM
sorry I misunderstood..you cannot save the file as you described. I thought you only wanted to change the name of the file.
Cheers,
Hakan.
12-08-2005 11:28 AM
In SAN-OS 1.x and 2.X, to save the config to a unique name everyday (for example, switch5_
$switchname = switch5
$date = `date +%m/%d/%y%`
#ssh
That would give you a local file of ./switch5_120805.conf
This way you're not overwriting the switch's config on the server every time you backup the config.
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: