cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1246
Views
0
Helpful
6
Replies

Redirect of running config results in 0 byte file

USD SmartAlerts
Level 1
Level 1

I use this method to backup all my switch configs: show running-config | redirect tftp://10.10.10.200/coreswitch.cfg

 

However, I am having an issue getting this to work on our core switch. I do not get any errors. It outputs a 0 byte file. Here is the switch info:

 

Catalyst 3850, IOS-XE 3.7.4

 

Does anyone have any ideas or have you seen this as well? Thanks!

6 Replies 6

Joseph W. Doherty
Hall of Fame
Hall of Fame

As alternative, have you tried copy running-config tftp://10.10.10.200/coreswitch.cfg

Thank you for that! It worked. Now the question is: How do I make that work with kron? I have been using kron to automate the backups each night, but when I run the 'copy' instead of 'redirect', it wants additional input (even though I am only hitting 'enter' twice. Any ideas?

Have you considered using the archive option.   It can archive each time configuration is written to memory, as well as predetermined time schedule.

I haven't used that before, but it looks like a good option. The only issue I seem to be having with that one is that I would prefer a single file only, without a time stamp or version. Right now, it gives me 'coreswitch.cfg-<timestamp>-1. Also, I can't seem to set a specific time, but it would still be every 24 hours I guess.

Hello,

 

KRON doesn't work with interactive copy commands, so you will have to use the 'show run' which you originally tried and which didn't work. The question is why it doesn'twork. You might want to try and increase the tftp blocksize:

 

3850(config)#ip tftp blocksize 8192

 

There are other options such as setting a timeout value with the 'ip tftp' command.

Either way, the KRON script would look like this:

 

3850(config)#kron policy-list SaveBackup
3850(config-kron-policy)#cli show run | redirect tftp://10.10.10.200/coreswitch.cfg
3850(config-kron-policy)#exit
3850(config)#kron occurrence SaveBackup at 00:00 recurring
3850(config-kron-occurrence)#policy-list SaveBackup

 

Thanks for this! I tried setting the blocksize to 8192 and min-timeout to 20, but it stills gives me the o byte file. This is the method I use on all my access switches, but it doesn't seem to want to work on the core.
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: