cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3882
Views
0
Helpful
3
Replies

Backup of WLC configuration

Johannes Luther
Level 4
Level 4

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!

1 Accepted Solution

Accepted Solutions

Naveen Kumar
Level 4
Level 4

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 \r"

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

View solution in original post

3 Replies 3

mervw
Level 1
Level 1

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

I came across this site where the author of the attached script runs in on a Linux machine to download configs from routers & switches. A bit of modifying & you may get it to work with a WLC.

Naveen Kumar
Level 4
Level 4

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 \r"

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

Getting Started

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: