Sunday, June 30, 2013

Unattended backups for Cisco appliances using scp

It's a good practice to keep your Cisco running configuration backed up to a remote backup repository on a regular basis, most convenient way I have found is using 'archive' function in the IOS and transferring the configuration over 'scp':
router01#conf t
router01(config-archive)#path scp://bkpadmin:passw0rd@$h-$trouter01(config-archive)#time-period 720
router01(config-archive)#do wr

  • - is my backup server
  • bkpadmin/passw0rd - my remote user credentials.
  • $h - is the hostname of the appliance
  • $t - is the backup time stamp
  • Backup time interval is specified in minutes so in my case the backup occurs twice a day (1440 minutes=24h).

Your running-config will be saved in file such as:

#ls /backup