05-01-2011 05:19 PM
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
05-01-2011 09:04 PM
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.
05-01-2011 09:11 PM
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
05-01-2011 09:42 PM
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
05-01-2011 09:50 PM
You can set it to five minutes. That's fine. You can also test a manual archive with the "archive config" EXEC command.
05-01-2011 10:19 PM
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.........
05-03-2011 01:06 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide