Wireless Access

Reply
New Contributor
Posts: 2
Registered: ‎10-24-2015

what is the absolute path of running- or startup-config file?

Hello,

 

I'm writing a script to perform nightly configuration backup for all the Aruba S3500 switches. I'm using scp but cannot find the location of neither running- nor startup-config. Aruba indicates it is in flash: or maybe /flash but the following command does not seem to be able to find them there:

 

sshpass -p <password> scp -vv <user>@<switch_ip>:flash:running-config running-config

 

I have also tried but failed:

/flash/running-config

:flash/running-config

 

I tried also to create a backup for the flash -> flashbackup.tar.gz

 

dir shows the file there but

sshpass -p <password> scp -vv <user>@<switch_ip>:flashbackup.tar.gz flashbackup.tar.gz

still could not find the file...

 

Any idea what I did wrong?

 

Thanks!!

 

             - francis

Moderator
Posts: 321
Registered: ‎08-28-2009

Re: what is the absolute path of running- or startup-config file?

Hi Francis

The startup config is at /flash/config/default.cfg but you cannot get to it using scp from outside, neither the MAS or controller allows inbound SCP, only outbound (same for ftp, tftp etc.)

 

The other problem with using something like sshpass is that if you want to SCP out of the controller you need to be able to interactively enter the scp password.

 

to get the startup config out, use

 

copy flash: default.cfg tftp: 1.2.3.4  default.cfg

or

copy flash: default.cfg scp: 1.2.3.4 username /path/to/somewhere/default.cfg

 

It's better to backup the whole flash, as it will allow the controller to be rebuilt much faster if there is a need for it, i.e.

 

backup flash

copy flash: flashbackup.tar.gz scp: 1.2.3.4 root /somewhere/flashbackup.tar.gz

or

copy flash: flashbackup.tar.gz tftp: 1.2.3.4  flashbackup.tar.gz

 

As for how to automate this, you can use expect or some other scripting language to automate this. There is likely freeware available for Cisco switches that will do the job. Another option is to automate via the webUI (there are freeware webUI automation tools around the place), where you can automate

 

1> nav to login -> maintenance -> file -> backup flash -> create backup (click) -> wait 1 minute

2> nav to file -> copy files -> flash filesystem (select flashbackup.tar.gz) -> tftp server (input ip/filename) -> Apply

 

regards

-jeff

New Contributor
Posts: 2
Registered: ‎10-24-2015

Re: what is the absolute path of running- or startup-config file?

Cool!!!  Thanks, Jeff!!!  ^^

 

        - francis

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