Wireless Access

Reply
Contributor I

Automated MM Config Backup?

I know how to backup the MM flash/config to FTP manually, is there a way to schedule/automate this?  I want to have the MM config backed up to FTP on a daily or weekly basis.


Accepted Solutions
Highlighted

Re: Automated MM Config Backup?

you can archive the configuration file automatically using the script enable on the MM.

 

sample example:

 

I got it working using an expect script.  It's ugly for now.  I will clean it up later, but:

 

#!/usr/bin/expect

#get local server ipaddr (it's dhcp)
spawn ifconfig eth0
expect -re {inet addr:(\S+)}
set ipaddr $expect_out(1,string)
expect eof

set systemtime [clock seconds]
set now [clock format $systemtime -format %m-%d-%y-%H-%M-%S]
set transfer "copy flash: flashbackup.tar.gz scp: $ipaddr backupuser $now.hostname-flashbackup.tar.gz"

#ssh to controller
spawn ssh user@1.1.1.1

#backup to flash on controller
expect {
"(hostname) #" {send "backup flash\r"}
}

#scp transfer flash backup to local server
expect {
"(hostname) #" {send "$transfer\r"}
}

#scp password
expect {
"Password:" {send "tHePaSsWoRd\r"}
}

sleep 10

# exit
expect {
"(hostname) #" {send "exit\r"}
}

 

 

you can do using SCP protocol.

 

Best Regards,

Suresh

 

 

View solution in original post

Highlighted
MVP Expert

Re: Automated MM Config Backup?

Do you have AirWave ?
If you do , you can use AirWave to automatically backup the MM “flash backup”



Thank you

Victor Fabian

Pardon typos sent from Mobile
Thank you

Victor Fabian
Lead Mobility Architect @WEI
AMFX | ACMX | ACDX | ACCX | CWAP | CWDP | CWNA

View solution in original post


All Replies
Highlighted

Re: Automated MM Config Backup?

you can archive the configuration file automatically using the script enable on the MM.

 

sample example:

 

I got it working using an expect script.  It's ugly for now.  I will clean it up later, but:

 

#!/usr/bin/expect

#get local server ipaddr (it's dhcp)
spawn ifconfig eth0
expect -re {inet addr:(\S+)}
set ipaddr $expect_out(1,string)
expect eof

set systemtime [clock seconds]
set now [clock format $systemtime -format %m-%d-%y-%H-%M-%S]
set transfer "copy flash: flashbackup.tar.gz scp: $ipaddr backupuser $now.hostname-flashbackup.tar.gz"

#ssh to controller
spawn ssh user@1.1.1.1

#backup to flash on controller
expect {
"(hostname) #" {send "backup flash\r"}
}

#scp transfer flash backup to local server
expect {
"(hostname) #" {send "$transfer\r"}
}

#scp password
expect {
"Password:" {send "tHePaSsWoRd\r"}
}

sleep 10

# exit
expect {
"(hostname) #" {send "exit\r"}
}

 

 

you can do using SCP protocol.

 

Best Regards,

Suresh

 

 

View solution in original post

Highlighted
MVP Expert

Re: Automated MM Config Backup?

Do you have AirWave ?
If you do , you can use AirWave to automatically backup the MM “flash backup”



Thank you

Victor Fabian

Pardon typos sent from Mobile
Thank you

Victor Fabian
Lead Mobility Architect @WEI
AMFX | ACMX | ACDX | ACCX | CWAP | CWDP | CWNA

View solution in original post

Highlighted
Contributor I

Re: Automated MM Config Backup?

thank you this is great info, sorry for the dumb question, but how exaclty do you get this script in the config?

Highlighted
Moderator

Re: Automated MM Config Backup?


@a_human wrote:

thank you this is great info, sorry for the dumb question, but how exaclty do you get this script in the config?


you dont - it's a standalone expect script to be placed on a linux pc/vm (not windows based on how it's written) and it will connect to the controller, perform a flash backup and then SCP back to itself.

 

If you are not familiar with expect or Linux (and you prefer Windows) then you may want to look into using a SSH terminal program which supports macros/scripts to ssh in, backup the flash and run the correct CLI command to scp/ftp it out; then setup taskschd in windows to run the macro daily etc.

 

the final alternative I can suggest is you can use some sort of web automation tool/macro tool (they exist, check in Google etc.) to record yourself logging into the webUI of the controller then performing a backup flash from the Maintenance menu (note in AOS 6 you cannot direct download the flash backup via the webUI you have to use a file server, but in Aos 8 you can download it directly)

 

hth,

-jeff

Highlighted
Contributor I

Re: Automated MM Config Backup?

Understood, thanks for clarifying.  Disappointing that airwave is the only way to autmate this with Aruba equipment, i'll probably just work on getting that going then, I just always prefer to not touch airwave if possible...  Thanks for the script though, i'll save this for future use and it may just come in handy for another use case.  thanks everyone!

Search Airheads
cancel
Showing results for 
Search instead for 
Did you mean: