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
router01(config-archive)#path scp://bkpadmin:passw0rd@10.10.1.10//backup/bkp-$h-$trouter01(config-archive)#time-period 720
router01(config-archive)#do wr
Where:
- 10.10.1.10 - 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
bkp-router01-Jun-30-11-27-15.585-0