03-09-2011 08:29 AM - edited 03-06-2019 03:59 PM
I am running into an issue with trying to backup my configuration (on several switches).
If I run the following, I get a new empty file on the FTP server
show run | redirect ftp://user:pass@10.10.10.1/myconfig.txt
if I do a copy runn ftp://user:pass@10.10.10.1/myconfig.txt, it works just fine, but requires manual input to confirm the address and filename
I'm trying to accomplish this with a kron schedule, but right now I can't even get it to work from the console. I had thought that it was because I wasn't granting modify access on the ftp server (and assumed that maybe the redirect option might be appending to a file line by line), but when I granted full access, I still have the same issue. The file gets created just fine, it just has nothing in it.
I'm fairly certain there is a mistake I'm making since I have tried this on multiple switches with the same result. The switch I'm testing on now is (C3560 Boot Loader (C3560-HBOOT-M) Version 12.2(44)SE5)
I found instructions for setting this up at http://www.cisco.com/en/US/products/sw/iosswrel/ps1835/products_tech_note09186a008020260d.shtml#ftp but haven't been able to find any resources on troubleshooting the redirect pipeline command
Solved! Go to Solution.
03-23-2011 08:53 AM
Have all switches involved the same IOS version ?
Regards.
Alain.
03-16-2011 12:47 PM
Hello Michael,
Did you resolve the problem?
The command syntax seems OK. Did you try to debug the file transfer with "debug ip ftp"?
Best regards,
César.
03-23-2011 07:25 AM
I get the following when I turn on debug ip ftp:
Writing config.test.txt
Mar 23 14:21:28 UTC: FTP: 220 Microsoft FTP Service
Mar 23 14:21:28 UTC: FTP: ---> USER thisismyusername
Mar 23 14:21:28 UTC: FTP: 331 Password required for thisismyusername.
Mar 23 14:21:28 UTC: FTP: ---> PASS thisismypassword
Mar 23 14:21:29 UTC: FTP: 230 User logged in.
Mar 23 14:21:29 UTC: FTP: ---> TYPE I
Mar 23 14:21:29 UTC: FTP: 200 Type set to I.
Mar 23 14:21:29 UTC: FTP: ---> PASV
Mar 23 14:21:30 UTC: FTP: 227 Entering Passive Mode (192,168,1,146,55,185).
Mar 23 14:21:30 UTC: FTP: ---> STOR config.test.txt
Mar 23 14:21:30 UTC: FTP: 125 Data connection already open; Transfer starting.
Mar 23 14:21:30 UTC: FTP: ---> QUIT
Mar 23 14:21:30 UTC: FTP: 226 Transfer complete.
Mar 23 14:21:30 UTC: %SYS-3-URLWRITEFAIL: redirection url write failed 'Unknown error 0'
03-23-2011 07:59 AM
Hi,
Can you do the same debug when you do the copy command.
Regards.
alain.
03-23-2011 08:09 AM
Writing mycfgtest.txt
Mar 23 15:07:09 UTC: FTP: 220 Microsoft FTP Service
Mar 23 15:07:09 UTC: FTP: ---> USER xxxxxxxxxxxxxx
Mar 23 15:07:09 UTC: FTP: 331 Password required for xxxxxxxxxxxxx.
Mar 23 15:07:09 UTC: FTP: ---> PASS yyyyyyyyyyyyyyyyy
Mar 23 15:07:10 UTC: FTP: 230 User logged in.
Mar 23 15:07:10 UTC: FTP: ---> TYPE I
Mar 23 15:07:10 UTC: FTP: 200 Type set to I.
Mar 23 15:07:10 UTC: FTP: ---> PASV!
13595 bytes copied in 4.966 secs (2738 bytes/sec)
Mar 23 15:07:11 UTC: FTP: 227 Entering Passive Mode (192,168,1,146,58,165).
Mar 23 15:07:11 UTC: FTP: ---> STOR mycfgtest.txt
Mar 23 15:07:11 UTC: FTP: 125 Data connection already open; Transfer starting.
Mar 23 15:07:11 UTC: FTP: ---> QUIT
Mar 23 15:07:11 UTC: FTP: 226 Transfer complete.
I also noticed, that if I take the username and password from the url, and specify them with the ios commands (IP FTP User/Pass), it works fine
I must have just missed the error earlier, because when I try that now, it still fails
Message was edited by: Michael Read
03-23-2011 08:44 AM
Hi,
What about the sh run | tee and sh run | append commands are they also failing?
Regards.
Alain.
03-23-2011 08:51 AM
yes, both fail also.
tee does write the config to the console, just fails on the FTP transfer
03-23-2011 08:53 AM
Have all switches involved the same IOS version ?
Regards.
Alain.
03-23-2011 09:08 AM
yes, all are the same version
just now tried it from a router, and it worked fine
think it is a bug in the IOS version I'm running??
Cisco IOS Software, C3560 Software (C3560-IPSERVICESK9-M), Version 12.2(53)SE, RELEASE SOFTWARE (fc2)
03-23-2011 09:13 AM
01-31-2013 06:52 PM
I get exactly the same thing, but when trying to redirect or tee output from 'show tech-support' to flash:
show tech-support | redirect flash:filename.txt
Feb 1 02:44:31.739: %SYS-3-URLWRITEFAIL: redirection url write failed 'No space left on device'
But if I look at the flash device, its got 6MB of space left:
Directory of flash:/
2 drwx 0 Mar 1 1993 11:00:50 +11:00 online_diag
3 -rwx 916 Mar 1 1993 11:00:49 +11:00 vlan.dat
4 -rwx 2797 Feb 1 2013 13:14:56 +11:00 private-config.text
5 -rwx 8987499 Mar 28 2011 19:54:51 +11:00 c3750-ipbasek9-mz.xxx-xx.SE6.bin
6 -rwx 4120 Feb 1 2013 13:14:56 +11:00 multiple-fs
9 -rwx 1 Feb 1 2013 13:44:45 +11:00 show-tech.txt
10 -rwx 22485 Feb 1 2013 13:14:56 +11:00 config.text
15998976 bytes total (6978560 bytes free)
The version of IOS running in the switch doesn't support the 'squeeze' command, so I can't do that. Any thoughts?
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