02-17-2009 11:50 AM - edited 07-03-2021 05:11 PM
Hi community,
I have a question regarding backing up the WLC config automatically, hope you are able to help.
I understand, that the WLC (4402) is not compatible with CiscoWorks. I want to back up the WLC configuration periodically. I know that there's the "transfer upload ..." command, but this way the configuration is backed up manually. Is there a simple way to push or poll the configuration of a WLC daily? Has someone written some kind of script for that and wants to share it?
Currently we don't use WCS - but that won't solve the issue, when not using templates.
Thanks in advance for your answers!
Solved! Go to Solution.
09-11-2013 09:56 PM
you can use cron to call the shell script that calls the commands expect file.
commands expect script for backing up configs. Change the script upload variables for your environment
#!/usr/bin/expect
set router [ lindex $argv 0]
set username [ lindex $argv 1]
set password [ lindex $argv 2]
spawn ssh $router
#log_user 0
set timeout 10
expect "(yes/no)?" {
send "yes\r"; exp_continue }
expect "User:"
send -- "$username\r"
expect "assword:"
send -- "$password\r"
expect "Controller"
send -- "transfer upload datatype config\r"
expect "Controller"
send -- "transfer upload mode tftp\r"
expect "Controller"
send -- "transfer upload serverip
expect "Controller"
send -- "transfer upload start\r"
# some wlc config commands require yes/no verification
expect "(y/N)"
send -- "y\r"
expect "Controller"
send "logout\r"
expect "(y/N)"
send -- "n\r"
expect eof
Ref: https://supportforums.cisco.com/message/3438536#3438536
02-19-2009 08:22 PM
From what I understand you can do this with WCS or as you have asked maybe write a script that can SSH into the WLC then copy the config file.
The doc this link has info on using the WCS method: http://www.cisco.com/en/US/docs/wireless/technology/controller/deployment/guide/dep.html#wp1069103
02-19-2009 08:38 PM
09-11-2013 09:56 PM
you can use cron to call the shell script that calls the commands expect file.
commands expect script for backing up configs. Change the script upload variables for your environment
#!/usr/bin/expect
set router [ lindex $argv 0]
set username [ lindex $argv 1]
set password [ lindex $argv 2]
spawn ssh $router
#log_user 0
set timeout 10
expect "(yes/no)?" {
send "yes\r"; exp_continue }
expect "User:"
send -- "$username\r"
expect "assword:"
send -- "$password\r"
expect "Controller"
send -- "transfer upload datatype config\r"
expect "Controller"
send -- "transfer upload mode tftp\r"
expect "Controller"
send -- "transfer upload serverip
expect "Controller"
send -- "transfer upload start\r"
# some wlc config commands require yes/no verification
expect "(y/N)"
send -- "y\r"
expect "Controller"
send "logout\r"
expect "(y/N)"
send -- "n\r"
expect eof
Ref: https://supportforums.cisco.com/message/3438536#3438536
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: