Use an FTP Server to Backup the Configuration
1. At the Router> prompt, issue the enable command, and provide the required password when prompted.
The prompt changes to Router#, which indicates that the router is now in privileged mode.
2. Configure the FTP username and password.
Switch#
config terminalSwitch(config)#
ip ftp username testSwitch(config)#
ip ftp password test123Switch(config)#
endSwitch#
3. Create a backup and copy the running-configuration into a ftp server. If you have correctly set the ftp user and password, you will get an output as follows.
Switch#
copy running-config ftp://xxx.xxx.xxx.xxx/running-config.txtAddress or name of remote host [xxx.xxx.xxx.xxx]?Destination filename [running-config.txt]?Writing running-confix.txt !3267 bytes copied in 1.484 secs (2201 bytes/sec)Switch#
4. You have to use Kron to backup the configuration periodically. Here in this case, backup process must not be interactive.
You can use the following command to create backup and copy it to FTP server automatically witout any interactive session.
Switch#
show running-config | redirect ftp://xxx.xxx.xxx.xxx/running-config.txtSwitch#
5. Create a new backup policy for the backup job.
Switch (config)#kron policy-list Backup
Switch (config-kron-policy)#cli show running-config | redirect ftp://xxx.xxx.xxx.xxx/running-config.txt
Switch (config-kron-policy)#end
6. Create a Kron occurrence named 'Daily-Backup' to run on daily at 00:00. Also add the kron policy in this kron job.
Switch (config)#
kron occurrence Daily-Backup at 00:00 recurringSwitch (config-kron-occurrence)#
policy-list BackupSwitch (config-kron-occurrence)#
endSwitch #
You can check the status of Kron using the following command.
Switch #
sh kron scheduleKron Occurrence ScheduleBackup inactive, will run again in 0 days 03:18:44 at 0 :00 onYou can check the current running configuration using the following command. You can find the Kron job settings in the running configuration.
You can find a portion of kron as like follows when running the following command.
Switch #
show running-config...
kron occurrence Daily-Backup at 0:00 recurring policy-list Backup!kron policy-list Backup cli show cli show running-config | redirect ftp://xxx.xxx.xxx.xxx/running-config.txt!kron policy-list backup!...Verify if the Kron job successfull copied the back in the remote server.
Note:-
You can modify the cronjob to run on different time.
To remove commands from the policy-list,
Switch(config)#
kron policy-list BackupSwitch(config-kron-policy)#
no cli show running-config | redirect ftp://xxx.xxx.xxx.xxx/running-config.txtSwitch(config-kron-policy)#
endReference:
http://www.cisco.com/en/US/products/sw/iosswrel/ps1835/products_tech_note09186a008020260d.shtml