Use Kron Tab to run scheduled command
Router#c Enter configuration commands, one per line. End with CNTL/Z. rtr1-Rack2(config)# rtr1-Rack2(config)#kron occurrence BACKUP-RUN in 2 recurring rtr1-Rack2(config-kron-occurrence)#policy-list BACKUP-RUN Kron: Policy Accepted, Policy needs to be configured rtr1-Rack2(config-kron-occurrence)#exit rtr1-Rack2(config)#kron policy-list BACKUP-IN rtr1-Rack2(config-kron-policy)#cli copy run start rtr1-Rack2(config-kron-policy)#^Z rtr1-Rack2# *Nov 17 12:53:25.107: %SYS-5-CONFIG_I: Configured from console by console rtr1-Rack2#sh kron schedule Kron Occurrence Schedule BACKUP-RUN inactive, will run again in 0 days 00:00:08 rtr1-Rack2#sh run | s kron kron occurrence BACKUP-RUN in 2 recurring policy-list BACKUP-RUN kron policy-list BACKUP-IN cli copy running-config startup-config rtr1-Rack2#
Periodical Configuration Saving
Periodical configuration save of Cisco devices can be done from inside the device by using a combination of "kron" and "archive" commands. I usually place the backup on a network path.
Define the location of your configuration save apart from the default Flash location. Based on your IOS support, this can be a HTTP, HTTPS, FTP, or TFTP path. I include the device name and the timestamp:
archive path tftp://10.10.10.10/cisco/$h-$t write memory
Define the policy list for the scheduler. The following is calling the "write config" command which will trigger the copy over network from the above:
kron policy-list backup-config cli write memory
Define the schedule of the policy. The following example is for five minutes past midnight, everyday:
kron occurrence daily-config-backup at 0:05 recurring policy-list backup-config
Note: Every time the "write memory" command is issued, the device will trigger a network copy to the path specified above.
--IPv6Freely 09:55, 18 July 2008 (CDT)