Automatic configuration upload on WLC?

Answered Question
Sep 7th, 2011

Hi,

Is there a way to schedule automatic configuration uploads (backups) on WLCs? It should be done without using WCS.

Thank you in advance.

Regards,

Andras

The solution has been added in the following document;-

https://supportforums.cisco.com/docs/DOC-21757

I have this problem too.
0 votes
Correct Answer by ericgarnel about 3 years 7 months ago

There is a way to do this using expect scripts

See my post at https://supportforums.cisco.com/message/3438495#3438495

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Surendra BG Wed, 09/07/2011 - 05:50

hmmmm... i am not aware of such stuff without using WCS... u can go for SNMP WALK using any freeware SNMP stuffs from the net..

Regards

Surendra

Correct Answer
ericgarnel Wed, 09/07/2011 - 13:03

There is a way to do this using expect scripts

See my post at https://supportforums.cisco.com/message/3438495#3438495

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

Actions

Login or Register to take actions

This Discussion

Posted September 7, 2011 at 5:17 AM
Updated January 3, 2012 at 12:28 AM
Stats:
Replies:3 Overall Rating:5
Views:6063 Votes:0
Shares:0
 

Trending Topics: Other Wireless Mobility

client could not be authenticated
Network Analysis Module (NAM) Products
Cisco 6500 nam
reason 440 driver failure
Cisco password cracker
Cisco Wireless mode