01-08-2019 01:55 AM - edited 03-08-2019 04:58 PM
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
01-08-2019 02:34 AM
- You may find some hints below :
https://community.cisco.com/t5/switching/using-scp-to-backup-your-configs-safely/td-p/1208822
M.
01-08-2019 02:56 AM
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
01-08-2019 05:33 AM
- What about :
% scp admin_user@nex3khostname://bootflash/running-config . destination_file
M.
01-08-2019 04:12 PM
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.
(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
Thanks Nat
06-24-2019 09:12 AM
HI Nat, I have the same problem. Did you work it out?
Thanks
06-24-2019 04:23 PM
No unfortunately not. But hopefully your reply gets a fresh set of eyes on this problem.
06-30-2019 06:17 PM
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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide