03-09-2020 08:12 AM
Hi Guys!
I want to make backups of my switch automatically. If I send the command via CLI the switch creates a backup but if I try to run a kron job it fails.
Does somebody has an idea?
That works via CLI:
show run | redirect tftp://10.10.10.10/switch-01.cfg
This kron config does not work:
kron policy-list Backup cli show run | redirect tftp://10.10.10.10/switch-01.cfg exit kron occurrence Backup at 06:00 monday recurring policy-list Backup exit
Switch model: C2960X
IOS Version: 15.2(2)E6
Solved! Go to Solution.
03-10-2020 03:36 AM
I found the solution.
The problem was, that I wrote
cli show run | redirect ...
instead of
cli show running-config | redirect ...
But thank you for your help!
03-09-2020 08:49 AM - edited 03-09-2020 08:51 AM
Hi
could use archive as another option instead of flash use tftp , would be a better feature for backups if there is a bug in that software
Your config looks right for kron
archive
log config
logging enable
hidekeys
path flash:Archive.cfg
maximum 2
write-memory
time-period 1440
Helpful link
https://www.ciscozine.com/how-to-use-archive-command-to-save-configuration/
03-09-2020 09:43 AM
03-10-2020 03:36 AM
I found the solution.
The problem was, that I wrote
cli show run | redirect ...
instead of
cli show running-config | redirect ...
But thank you for your help!
03-10-2020 03:38 AM
05-13-2020 06:21 PM
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