Automatic configuration upload on WLC?

Answered Question
Sep 7th, 2011
User Badges:
  • Silver, 250 points or more

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

Correct Answer by ericgarnel about 5 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 (2 ratings)
Loading.
Surendra BG Wed, 09/07/2011 - 05:50
User Badges:
  • Cisco Employee,

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

sachinc01 Thu, 02/25/2016 - 21:31
User Badges:

Hi Sir,

How to take back up of

Model: AIR-CT2504-25-K9Z Ask file path & file name Which name I will asign for back up..

Any one name or perticuller please suggest

Correct Answer
ericgarnel Wed, 09/07/2011 - 13:03
User Badges:
  • Gold, 750 points or more

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

This Discussion

Related Content

 

 

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