top of page
Using Archive, Kron and SCP to protect your configs
Ok this little script will create a directory in flash, use the archive feature to archive everytime you copy the running-config to startup-config, then daily at 10pm commit a wr, which in turn archives it at flash:/Config-archive/ and then, every day at 11pm copies the config to a remote windows box running an SCP server.
Mkdir flash:/Config-Archive
!
Archive
path flash:/Config-Archive/
write-memory
!
!
kron occurrence KRON-OCC-2200 at 22:00 recurring
policy-list KRON-POL-SAVE-CONFIG
kron occurrence KRON-OCC-2300 at 23:00 recurring
policy-list KRON-POL-SCP-CONFIG
!
!
kron policy-list KRON-POL-SAVE-CONFIG
cli wr
kron policy-list KRON-POL-SCP-CONFIG
cli copy running-config scp://user:password@destination/sitefolder/
bottom of page