I have made a script for making easily backup of the configuration of switch. I have enclosed the python script.
You can download a windows executable version at :
It works also for Brocade and McData switches.
The site of the project is :
With this script, you can get a backup of the configuration on your PC without installing any FTP or SSH server
i am getting the following error..
Serving FTP on 10.20.42.59:21
FTPServer : waiting for the file
**TelnetClient** Transfert Failed !
I have a similar, although less sophisticated python script. I call this script from a master shell script which passes the IP address of the switch and its name. I then cron the master script.
To run this, you will need an operator account on the brocade switch and a user account on the host that the config will be sent to.
I recommend that you run this job as root, since storing the passwords in the script can be dangerous. running as root will provide additional security for the file.
#! /usr/bin/env python
# This script uploads the config from the supplied IP to the# brocade user's home directory on punch# Author: Bill York
# PARAMETERS# IPADDR: The IP address of the switch# SWNAME: The name of the switch
import telnetlibimport sys
# initialize variablesuser = "brocade"# storing passwords in the file is INHERENTLY INSECURE. do it anyway.spwd = "BrocadeUserPasswordOnSwitch"upwd = "BrocadeUserPasswordOnHost"# The master script MUST PASS the IP address of the switch to backup. THERE IS NO ERROR CHECKING HERE.IPADDR = sys.argvSWNAME = sys.argv
# open connection to switchtn = telnetlib.Telnet(IPADDR)
# enter user nametn.read_until("login: ")tn.write(user + "\n")
# enter passwordtn.read_until("Password: ")tn.write(spwd + "\n")
# send configupload commanduploadcommand = "configupload -p scp IPADDRESSOFHOST,brocade,\"/home/brocade/" + SWNAME + "\"\n"# Don't forget to allow IPTABLES ssh access from the switch.tn.write(uploadcommand)
# stupid command does not allow for password entry while using scp# so wait for it to ask and then enter it.tn.read_until("password: ")tn.write(upwd + "\n")
# wait for the command to complete#tn.read_until("are uploaded")
# get outtn.write("exit\n")
# we're done.
I just downloaded save-simply-your-san, and it works great! I looked at the backup file it creates, and it looks complete.
But how do I do a restore to a Brocade switch? Do I use the standard 'cfgdownload' command?