Developer

last person joined: yesterday 

Expand all | Collapse all

How to ArubaOS 8 flash backup and file copy using API?

Jump to Best Answer
This thread has been viewed 53 times
  • 1.  How to ArubaOS 8 flash backup and file copy using API?

    Posted Dec 10, 2019 10:35 PM

    I want to script these 2 items: running flash backup, and copying the resulting tar.gz file off the ArubaOS 8 device.

     

    I went into this thinking that I could find an Action Object similar to 'write_memory', but I don't see anything for backup or file copy.

     

    Then I thought "no problem, I can send CLI commands over API" but I found that this method can only be used to send 'show' commands.

     

    Any advice or alternative methods?



  • 2.  RE: How to ArubaOS 8 flash backup and file copy using API?

    Posted Dec 11, 2019 01:04 AM

    Hi,

     

    do you have check on swagger ?

    After a quick look on API doc, there is API call for get configuration

    https://www.arubanetworks.com/techdocs/ArubaOS_85_Web_Help/Content/nbapiguide/spcl-get-qry.htm ( Getting Full Configuration of a Node)



  • 3.  RE: How to ArubaOS 8 flash backup and file copy using API?

    Posted Dec 11, 2019 02:41 PM

    @alagoutte wrote:

     

    After a quick look on API doc, there is API call for get configuration

     


     In ArubaOS 8.x getting the text configuration is not the same thing as backing up the flash.



  • 4.  RE: How to ArubaOS 8 flash backup and file copy using API?

    Posted Dec 11, 2019 05:00 PM

    Right. There are no HTTP based REST APIs today that can do a flash backup. 

     

    If you are familiar with CLI commands, you can use Aruba's Ansible modules to automate that using SSH. No need for writing a program or code. 

     

    This post has sample Ansible playbook that can be changed based on the commands that needs to be executed.

    https://community.arubanetworks.com/t5/Developer-Community/Ansible-Controller-Issues-Examples/m-p/548574

     

    Aruba's Official GitHub Repo has updated modules for the ArubaOS8 related changes. You could clone this repository and run the installer script using "--reinstall" option, that will apply the fix to Aruba's Ansible SSH modules in you ansible host machine. More info in readme file on how to install the modules. 

    https://github.com/aruba/aruba-ansible-modules

     

    https://github.com/aruba/aruba-ansible-modules/tree/master/aruba_module_installer

    sudo python aruba_module_installer.py --reinstall 

    Please note that you need to have Ansible installed in your Linux/MAC OS from where the playbook is executed. 



  • 5.  RE: How to ArubaOS 8 flash backup and file copy using API?

    Posted Dec 11, 2019 07:21 PM

     

    If you are familiar with CLI commands, you can use Aruba's Ansible modules to automate that using SSH. No need for writing a program or code. 

     


    Thanks for the Ansible links etc, but if this is the case then I will rather use SSH scripting directly with Powershell.

     

    Hopefully this functionality can be added to REST API in future.



  • 6.  RE: How to ArubaOS 8 flash backup and file copy using API?

    Posted Dec 11, 2019 11:42 PM

    @vf556 wrote:

    @alagoutte wrote:

     

    After a quick look on API doc, there is API call for get configuration

     


     In ArubaOS 8.x getting the text configuration is not the same thing as backing up the flash.


    Yes, i known

     

    if there is a missing REST API ask on innovate zone



  • 7.  RE: How to ArubaOS 8 flash backup and file copy using API?
    Best Answer

    Posted Dec 12, 2019 07:21 PM

    I just went over the API documentation. I did see the REST API for flash backup and copying the flash.. Apologize for the misinformation in the previous message. 

     

    These API endpoints are available under the Controller section of the controller's API documentation page (https://<mm-ip>:4343/api) and I have the AOS version 8.5

     

    /v1/configuration/object/flash_backup

    {
      "backup_flash": "flash",
      "filename": "string"
    }

    /v1/configuration/object/copy_flash_scp

    {
      "srcfilename": "string",
      "scphost": "string",
      "username": "string",
      "destfilename": "string",
      "passwd": "string"
    }

     

     



  • 8.  RE: How to ArubaOS 8 flash backup and file copy using API?

    Posted Dec 12, 2019 07:50 PM

    @dkarthik wrote:

    I just went over the API documentation. I did see the REST API for flash backup and copying the flash.. Apologize for the misinformation in the previous message. 

     

    Wow, thanks @dkarthik !



  • 9.  RE: How to ArubaOS 8 flash backup and file copy using API?

    Posted Feb 22, 2021 10:04 PM
    So, this worked well for me too - thanks. The API documentation you're referring to is just swagger interface at /api right? It doesn't look like they've actually documented any of the endpoints in there, is there a manual that has more details about what each one does?

    ------------------------------
    Mark Stuart
    ------------------------------



  • 10.  RE: How to ArubaOS 8 flash backup and file copy using API?

    Posted Feb 23, 2021 03:19 AM
    hi Mark,

    There is only Swagger for doc (and there is also may be a API Guide but don't explain all API call)

    ------------------------------
    PowerArubaSW : Powershell Module to use Aruba Switch API for Vlan, VlanPorts, LACP, LLDP...

    PowerArubaCP: Powershell Module to use ClearPass API (create NAD, Guest...)

    PowerArubaCX: Powershell Module to use ArubaCX API (get interface/vlan/ports info)..

    ACEP / ACMX #107 / ACDX #1281
    ------------------------------



  • 11.  RE: How to ArubaOS 8 flash backup and file copy using API?

    Posted Apr 19, 2021 12:58 PM


  • 12.  RE: How to ArubaOS 8 flash backup and file copy using API?

    Posted Feb 23, 2021 02:03 PM
    Hi Mark,

    We have some of the API endpoints in our Developer Hub with updated descriptions/doc for them and the query params. Hope this helps.
    https://developer.arubanetworks.com/aruba-aos/reference

    You can also go to the guide section for more developer related content.
    https://developer.arubanetworks.com/aruba-aos/docs

    Thanks,
    Karthik

    ------------------------------
    Karthikeyan Dhandapani
    ------------------------------



  • 13.  RE: How to ArubaOS 8 flash backup and file copy using API?

    Posted Apr 19, 2021 12:56 PM


  • 14.  RE: How to ArubaOS 8 flash backup and file copy using API?

    Posted Apr 19, 2021 12:56 PM