cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
6283
Views
9
Helpful
7
Replies

Using KRON to save config?

Mike McWethy
Level 1
Level 1

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
cli write
exit

kron occurrence SaveConfigSchedule at 23:00 Fri
policy-list SaveConfig

kron policy-list Backup
cli show run | redirect tftp://10.100.100.70/test.cfg
exit

kron occurrence Backup in 3
policy-list Backup

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:

http://www.cisco.com/en/US/products/sw/iosswrel/ps1835/products_tech_note09186a008020260d.shtml

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.

Mike

7 Replies 7

lgijssel
Level 9
Level 9

Hi  Mike,

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:

no prompt

This line is to prevent the tftp command prompting for whatever reason.

Perhaps your version will also work after configuring this rather simple line.

regards,

Leo

cadet alain
VIP Alumni
VIP Alumni

Hi,

kron commands can't be interactive. If you configure the file prompt quiet configuration command then it should work with the second policy.

Regards.

Alain.

Don't forget to rate helpful posts.

Hi Alain,

You are correct, this is the command I meant (but had forgotten)

Five points from me for refreshing my memory.

regards,

Leo

Hi Alain,

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.

milan.kulik
Level 10
Level 10

Hi,

it might be easier to use archive config command with path configured to your TFTP server and time-period one week?

See

http://www.cisco.com/en/US/docs/ios/fundamentals/command/reference/cf_a1.html#wp1021238

HTH,

Milan

Milan,

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:

CRAC#archive config

.....

%Error opening tftp://10.100.100.70/CRAC_Config-1 (Timed out)

Hi Mike,

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.

BR,

Milan

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:

Review Cisco Networking products for a $25 gift card