1

I am looking for a way to back up my Brocade FC switch configs (including zoning!). Does anyone have commands or automated methods that they use for this?

JakeRobinson
  • 2,904
  • 18
  • 26

2 Answers2

2

You'll want to telnet/ssh into the switch, and use the "configupload" command. The switch will then need to be supplied the IP/hostname to upload to, the username and password, and the method of transport. FTP and RSH are both supported in most switches.

Hyppy
  • 15,608
  • 1
  • 38
  • 59
1

I wrote a simple expect script to automate this for me nightly:

#!/usr/bin/expect -f
spawn ssh admin@$argv 
expect "password:"
send "mypassword\r"
expect "admin>"
send "configupload -all -ftp IPADDRESS,ftpuser,$argv.cfg,ftpuserpassword\r"
expect "admin>"
send "exit\r"

If you use a different user other than admin, make sure to change those expect "admin>" lines likely to your username used.

Then you run it as (if I named the expect script as brocade_backup):

/path/to/script/brocade_backup switchhostname

Throw it in a for loop if you have multiple switches you want to backup, etc.

for SWITCH in host1 host2 host3; do
    /path/to/script/brocade_backup $SWITCH
done

Make sure all the ssh keys are already confirmed in your known_hosts file before you run it or the script will error with y's scrolling across your screen.