I am trying to set up KRON to do a "write mem" and then save the config to my TFTP server. Here is the config I used:
kron policy-list SaveConfig
kron occurrence SaveConfigSchedule at 23:00 Fri
kron policy-list Backup
cli show run | redirect tftp://10.100.100.70/test.cfg
kron occurrence Backup in 3
The first portion works well. The second, Backup, does not. I can ping my TFTP server from this router that I am trying this out on. I can even do a "copy run tftp" then answer all the questions and it works just fine. I used the following document from Cisco to configure:
When I do a "debug kron all" it shows that it timed out. I'd like a second set of eyes to look at this and tell me what I am doing wrong.
Using the redirect like that is always cumbersome.
Perhaps a better way is to create an alias to perform the write command:
alias exec backup copy run tftp://10.100.100.70/test.cfg
This will (if I remember correctly) requires one additional command:
This line is to prevent the tftp command prompting for whatever reason.
Perhaps your version will also work after configuring this rather simple line.
kron commands can't be interactive. If you configure the file prompt quiet configuration command then it should work with the second policy.
Can you please help me with the command to get output for multiple show commands in a single text file like show vlan brief, show interface trunk, show ip eigrp neighbor and so on. Thanks.
it might be easier to use archive config command with path configured to your TFTP server and time-period one week?
Thanks for the archive suggestion. I liked it so I tried it. It too, gave me a problem. I set the path and the time-period. Do I not have the path set correctly. Again, I can ping my TFTP server and even do a copy run tftp with NO problems. Here is what I get:
%Error opening tftp://10.100.100.70/CRAC_Config-1 (Timed out)
I'm not sure what the problem could be.
Possible your TFTP server is not 100% compatible with Cisco?
I'm using the archive config on my routers with FTP transfer, not TFTP.
And it works without any problem.
I just had to set FTP user/password and source interface in my router config.
I also use archive write-memory instead of time-period but it should make no difference.