cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5003
Views
0
Helpful
7
Replies

scp running-config from Nexus3k

pfj
Level 1
Level 1

Hi there,

 

I'm trying to scp running-config from Cisco Nexus 3k via debian host.  Hoping someone knows how to do this.  I've tried the following.   Any suggestions?

 

root@debian-lab:~# scp 10.10.10.6:running-config .

scp: /bootflash/running-config: No such file or directory

 

root@debian-lab:~# scp 10.10.10.6:system:running-config .

Syntax error while parsing 'scp -f system:running-config'

 

Thanks,

Nat

7 Replies 7

marce1000
Hall of Fame
Hall of Fame

 

 - You may find some hints  below :

 https://community.cisco.com/t5/switching/using-scp-to-backup-your-configs-safely/td-p/1208822

M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

Thanks M - I've had a look through that discussion but still can't find out how to do this :)  Please note this is only for Nexus NXOS.  It works fine on Catalyst/IOS/IOSXR

 

Each variation I've tried gives the error:

 

If I try:

root@mgmt-lab:~# scp 10.10.10.6:running-config .

scp: /bootflash/running-config: No such file or directory
It is looking in /bootflash

 

If I try and get at the system:

root@mgmt-lab:~# scp 10.10.10.6:running-config .

root@mgmt-lab:~# scp 10.10.10.6:system//running-config .

root@mgmt-lab:~# scp 10.10.10.6:system///running-config .

Syntax error while parsing 'scp -f system:///running-config'

It gives a parsing error.

 

I've also looked at https://community.cisco.com/t5/switching/using-nx-os-9k-as-an-scp-server/td-p/2915441

 

Does anyone know where the running-config is normally located on Nexus switches?

Is it in a system directory?  And if so, can I cd (change directory) to the location of the running-config?

 

Thanks

Nat

 

 

 - What about :

 

      %   scp  admin_user@nex3khostname://bootflash/running-config . destination_file

 

 M.



-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
    When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '

Thanks again M for your help.  That didn't work either.  Perhaps there is another - let me back up and explain what I'm trying to do. 

 

Just a simple way to automate backups of running-config or startup-config for Nexus.  If it's possible I'd like to scp, but if there is another/better way please share. 

 

I tried the following but keeps putting me in /bootflash

 

debian# scp 10.10.10.6:/var/sysmgr/startup-cfg/ascii/system.cfg .
Nexus 3000 Switch
Password:
scp: /bootflash/var/sysmgr/startup-cfg/ascii/system.cfg: No such file or directory

 

I see the previous might be possible if I can somehow log into Nexus bash directly.

https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus9000/sw/7-x/programmability/guide/b_Cisco_Nexus_9000_Series_NX-OS_Programmability_Guide_7x/Bash.html

(config)# username foo shelltype bash

 

but that command isn't available for me on the Nexus3k for whatever reason.  Unfortunately I can't upgrade to test either - no support contract  :(

 

Still can't find out how to cd (change directory) to system either from Cisco cli

https://www.cisco.com/c/en/us/td/docs/switches/datacenter/sw/nx-os/fundamentals/configuration/guide/b_Cisco_Nexus_7000_Series_NX-OS_Fundamentals_Configuration_Guide/b_Cisco_Nexus_7000_Series_NX-OS_Fundamentals_Configuration_Guide_Release_6-x_chapter_...

 

Thanks Nat

 

HI Nat, I have the same problem.  Did you work it out?

Thanks

 

No unfortunately not.  But hopefully your reply gets a fresh set of eyes on this problem.

I looked into this again and this is the best I could come up with.  All from Linux host and no expect script - just ssh/scp.  Hopefully it helps someone in the future.

 

You can copy the running-config to bootflash:  

root@lab:~# ssh admin@192.168.1.95 'delete bootflash:BACKUP-NEXUS-running-config ; copy running-config bootflash:BACKUP-NEXUS-running-config'

 

Then scp it

root@lab:~# scp admin@192.168.1.95:BACKUP-NEXUS-running-config .

 

Cheers

Nat