Wired Intelligent Edge

last person joined: 4 hours ago 

Bring performance and reliability to your network with the HPE Aruba Networking Core, Aggregation, and Access layer switches. Discuss the latest features and functionality of your switching devices, and find ways to improve security across your network to bring together a mobile-first solution
Expand all | Collapse all

Config Backup Filenames

This thread has been viewed 6 times
  • 1.  Config Backup Filenames

    Posted Jul 17, 2018 12:23 PM

    Is there a way to insert the hostname of the switch into the filename of a config backup?

    Something like:

    (config)# backup startup-configuration to 10.1.1.1 $HOSTNAME$-backup.cfg

     

    The Cisco equivalent would be:

    archive

     path tftp://1.1.1.1/$h-backup.cfg

     

     

    Also, is there a way to use FTP or anything else instead of TFTP?



  • 2.  RE: Config Backup Filenames

    EMPLOYEE
    Posted Jul 17, 2018 03:04 PM

    Greetings!

     

    There is not, at present, a method to use parameters (such as the hostname) in the copy command within the switch CLI.  (This can be done programmatically, however, using the built-in REST API in conjunction with a scripting language or automation platform.)

     

    With regard to using protocols other than TFTP: ArubaOS-Switch also supports SFTP and SCP (the latter of which requires file transfers to be initiated from the management station rather than the switch).  To enable these protocols from the CLI, enable SSH (if not already enabled) and run the following command:

     

    switch(config)# ip ssh filetransfer

    This will enable SFTP/SCP and disable TFTP.  You would then use the following syntax to copy files from the switch to an SFTP server:

     

    switch# copy startup-config sftp user@server 


  • 3.  RE: Config Backup Filenames

    Posted Jul 18, 2018 07:23 AM

    Hi Matthew,

     

    I did find the "ip ssh filetransfer" command, but that doesn't seem to apply to the "backup" command.

     

    I do have plans to manage switches using the API and ansible - I can easily script in the $hostname functionality I am looking for.  Just the backup command would still use TFTP.  That's OK as I've got a TFTP server running properly (firewalled, etc.) already, but SCP would be a bit more modern.  Sure, I can pull the configs using SCP, but the backup command appeals to me in that it allows the switch to 'push' a backup config every time there's a change.

     

    Thanks!