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.