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

Redirect of running config results in 0 byte file

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!

Everyone's tags (1)
6 REPLIES 6
Highlighted
VIP Expert

Re: Redirect of running config results in 0 byte file

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

Highlighted

Re: Redirect of running config results in 0 byte file

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?

Enthusiast

Re: Redirect of running config results in 0 byte file

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

Highlighted

Re: Redirect of running config results in 0 byte file

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.

Highlighted
VIP Mentor

Re: Redirect of running config results in 0 byte file

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

 

Highlighted

Re: Redirect of running config results in 0 byte file

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.
CreatePlease to create content
Content for Community-Ad