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!
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.
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 occurrence SaveBackup at 00:00 recurring