cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2342
Views
0
Helpful
6
Replies

Kron backup jobs

Isaac Morgan
Level 1
Level 1

I have scheduled Kron backup jobs on my switches and routers.  I have scheduled it as below -

kron occurrence SaveConfig at 23:30 Sun recurring
policy-list SaveConfig
!
kron occurrence BackupRunningConfig at 23:45 Sun recurring
policy-list BackupRunningConfig
!
kron policy-list SaveConfig
cli write
!
kron policy-list BackupRunningConfig
cli show running-config | redirect tftp://10.33.4.70/DR_SWITCH_1/DR_SWITCH_1

This is working fine for me, the only problem is that each time it overwrites the exisiting config.

I would like to be able to keep the configs catalogued just incase I need to roll back, is any one aware of how to do this, perhaps put a time and date stamp on it?

Regards,

Isaac

6 Replies 6

Joe Clarke
Cisco Employee
Cisco Employee

Don't use kron for this.  Use Config Archive.  Configure this:

archive

path tftp://10.33.4.70/DR_SWITCH_1/$h-$t

time-period 1440

maximum 14

Of course, this assumes that your TFTP server is capable of having arbitrary files written to it.  Many TFTP servers do not allow this, so you may have to switch to a more secure protocol.

Thank you very much for your reply.  I have implemented the archive feature and appears to be working well.  I am just testing it on a couple of switches atm to see how it goes.

Isaac

Is there any issue with setting the time to 5 minutes, I just want to make sure it is copying correctly.  At the moment it isn't copying on schecdule only when I use WR

archive
path tftp://10.33.4.70/DR_SWITCH_1/$h
write-memory
time-period 5

Isaac

You can set it to five minutes.  That's fine.  You can also test a manual archive with the "archive config" EXEC command.

I can confirm it work when running archive command from EXEC

I have set it for 5 minutes but it doesn't appear to be working

It also works correctly when I use write memory, I don't want to just leave it at write memory as we have been caught out recently where some changes were done to a switch, site lost power, switch loaded up with old config.........

The output of "debug archive version" may show the problem.  You can also check "show archive" to see what error is displayed when the snapshots are taken.

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco