Wired Intelligent Edge (Campus Switching and Routing)

Reply
New Contributor

Config Backup Filenames

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?

Aruba Employee

Re: Config Backup Filenames

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 


MATTHEW FERN – TECHNICAL MARKETING ENGINEER, WIRED INTELLIGENT EDGE
Aruba, a Hewlett Packard Enterprise company

8000 FOOTHILLS BLVD  |  ROSEVILLE, CA 95747
T: 916.540.1759  |  E: mfern@hpe.com
New Contributor

Re: Config Backup Filenames

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!

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