Wireless Access

last person joined: 19 hours ago 

Access network design for branch, remote, outdoor, and campus locations with HPE Aruba Networking access points and mobility controllers.
Expand all | Collapse all

Automated MM Config Backup?

This thread has been viewed 9 times
  • 1.  Automated MM Config Backup?

    Posted Jan 24, 2020 07:14 PM

    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.



  • 2.  RE: Automated MM Config Backup?
    Best Answer

    Posted Jan 25, 2020 07:46 AM

    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

     

     



  • 3.  RE: Automated MM Config Backup?
    Best Answer

    Posted Jan 25, 2020 08:44 AM
    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


  • 4.  RE: Automated MM Config Backup?

    Posted Jan 27, 2020 07:57 PM

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



  • 5.  RE: Automated MM Config Backup?

    EMPLOYEE
    Posted Jan 29, 2020 11:43 PM

    @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



  • 6.  RE: Automated MM Config Backup?

    Posted Jan 30, 2020 01:12 PM

    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!