Aug 5 2013
Daily backup of Cisco router to ftp server
Today’s job was to configure a daily backup of our Cisco routers configuration to an FTP server. The setup we have here are a number of Cisco ADSL routers connected to head office via a IPSEC VPNs.
The good news is you do not need to purchase utilities or software.
1. If the router is remote to the ftp server you will most likely need to tell the router which interface to use (for us it is BVI1).
router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
router(config)#ip ftp source-interface BVI1
router(config)#exit
2. Create a policy-list, backup_ftp is just the name of the policy and following are the commands to run.
router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
router(config)#kron policy-list backup_ftp
router(config-kron-policy)#cli show run | redirect ftp://192.168.5.190/router-confs/router.cfg
router(config-kron-policy)#exit
router(config)#exit
router#
3. Tell the router when to run and what polices to run (5:00AM every day).
router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
router(config)#kron occurrence daily_backup at 5:00 recurring
router(config-kron-occurrence)#policy-list backup_ftp
router(config-kron-occurrence)#exit
router(config)#exit
router#wr
Building configuration…
[OK]
router#
Hope it helps someone.
Oct 28 2014
Rotate Apache log files they easy way
Here is how I configured access.log, ssl_request.log and error.log to rotate at midnight every day.
Put this below script in a file named rotateall.cmd and schedule a task to run at 12:00am every day.
Change the paths and service name to sute the setup.
By sysadmin • IT, Scripting • 0