Redirect of running config results in 0 byte file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2019 11:23 AM
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!
- Labels:
-
Catalyst 3000
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2019 11:31 AM - edited 07-25-2019 11:32 AM
As alternative, have you tried copy running-config tftp://10.10.10.200/coreswitch.cfg
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2019 12:12 PM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2019 12:28 PM
Have you considered using the archive option. It can archive each time configuration is written to memory, as well as predetermined time schedule.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2019 02:29 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2019 01:38 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2019 02:32 PM
