cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5146
Views
0
Helpful
8
Replies
Himanshu-Bansal
Beginner

kron policy not working

Hello Team,

today i configured kron policy on one of my switch for automatic configuration backup, but it doesn't work for me as i supposed.

am getting ping from my tftp server and also able to do manual backup from the same device but not automatic.

please help me for the same, below is the configuration for the kron correct me if i left something.

#kron policy-list test

#cli sh run-conf | redirect tftp://192.168.1.4/testbackup.cfg

#exit

.

.

.

.

#kron occurence dailybackup at 10:00 recurring

#policy-list test

#exit

8 REPLIES 8
Abzal
Rising star

Hi,

You could do it with script If your router supports Embedded Event Manager:

event manager applet DailyBackup_at_10_00

event timer cron name daily cron-entry "00 10 * * *" maxrun 30

action 1 syslog priority warnings msg "Configuration is Backed Up"

action 2 cli command "enable"

action 3 cli command "copy run tftp://192.168.1.4/testbackup.cfg" pattern "Address"

action 4 cli command "" pattern "Destination"

action 5 cli command ""

http://blog.ine.com/2010/01/18/eem-demystified-part-1/

Hope it will help.

Best regards,
Abzal

Best regards,
Abzal

Thanks for reply, unfortunately my switch doesn't support EEM, but i tried  kron once again but this time it comes in active state but with error please help me with this error as am not aware of this.

Regard's

himanshu

Hi,

Ok, tell then the switch model.

Hope it will help.

Best regards,
Abzal

Best regards,
Abzal

hi,

its 2960G and 3750E series switches.

Regard's

Himanshu.

Hi,

I am facing the same problem on Cisco 2960 switch. Can anyone pls help.

I think the issue with your setup is the fact that even though you specified all file details the system will ask for confirmation. Can you please try to configure file prompt quiet in global config mode and then schedule the kron job?

glen.grant
Advisor

  try to rewrite using these instructions.

Automatic Backup of Configuration using the Kron Method

In order to get a router to copy the running-config to startup-config, for example every Sunday at 23:00, complete these steps:

    Create a kron policy list—This is the script that lists what commands the router should run at the scheduled time.

        Router(config)#kron policy-list SaveConfig

                Router(config-kron-policy)#cli write

                Router(config-kron-policy)#exit

        cli—Specifies EXEC CLI commands within a Command Scheduler policy list.

        Policy-list—Specifies the policy list associated with a Command Scheduler occurrence.

    Note: The reason why write was used rather than copy running-config startup-config is because kron does not support interactive prompts and the copy running-config startup-config command requires interaction. It is important to remember this when you create commands. Also, note that kron does not support configuration commands.

    Create a kron occurrence—This informs the router when and how often the policy should run.

        Router(config)#kron occurrence SaveConfigSchedule

         at 23:00 Sun recurring

                Router(config-kron-occurrence)#policy-list SaveConfig

        SaveConfigSchedule—This is the name of occurrence. Length of occurrence-name is from 1 to 31 characters. If the occurrence-name is new, an occurrence structure will be created. If the occurrence-name is not new, the existing occurrence will be edited.

        at—Identifies that the occurrence is to run at a specified calendar date and time.

        recurring—Identifies that the occurrence is to run on a recurring basis.

    Verify the kron configuration by using the show command.

        Router#sh kron schedule

                 Kron Occurrence Schedule

                 SaveConfigSchedule inactive, will run again in 1 days 12:37:47 at 23:00 on Sun

        inactive—Means that kron is not running the command(s) at present.

        Active—Means that kron is running the current command(s).

        Router#show running-configuration

                  kron occurrence SaveConfigSchedule at 23:00 Sun recurring

                    policy-list SaveConfig

                    kron policy-list SaveConfig

                    cli write

Backup Configuration to a TFTP Server

This example is to save the running config to a TFTP server (10.1.1.1) every Sunday at 23:00:

    Router(config)#kron policy-list Backup

             Router(config-kron-policy)#cli show run | redirect

         tftp://10.1.1.1/test.cfg

             Router(config-kron-policy)#exit

             !

             Router(config)#kron occurrence Backup at 23:00 Sun recurring

             Router(config-kron-occurrence)#policy-list Backup

thanks for reply  glen.grant, i tried above mention configuration but the result is same error.

please help me in this error.

regard's

Himanshu