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
kron occurrence BackupRunningConfig at 23:45 Sun recurring
kron policy-list SaveConfig
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?
Don't use kron for this. Use Config Archive. Configure this:
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.
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
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.