Auto-Save Configuration
You can configure the router to automatically take the backup of the running configuration by using configuration commit auto-save command. This auto-save feature saves the configuration to the specified location on the router after every commit is made. These auto-save files are stored in the form of Linux files.
Configure Auto-Save
Use the configuration commit auto-save command to auto save the configuration.
Router#configure
Router(config)#configuration commit auto-save
Router(config-cfg-autosave)#commit
You can also configure options such as password , timestamp , maximum , and wait-time with the configuration commit auto-save command. The location to save the file-name must be specified in <protocol>://<user>@<host>:<port>/<url-path>/<file-name> format.
When filename is accessed through VRF, you can specify filename in filename <protocol>://<user>@<host>:<port>;<vrf name>/<url-path>/<file-name> format.
When you are using public key authentication, you don't need to mention password .
Router(config-cfg-autosave)#configuration commit auto-save filename sftp://user1@server1://test-folder/test_123
Router(config-cfg-autosave)#password clear encryption-default cisco
Router(config-cfg-autosave)#timestamp
Router(config-cfg-autosave)#maximum 10
Router(config-cfg-autosave)#wait-time days 0 hours 0 minutes 0 seconds 5
Router(config-cfg-autosave)#commit
Running Configuration
Router#show running-config configuration commit auto-save
configuration commit auto-save
filename sftp://user1@server1://test-folder/test_123
password encrypted encryption-default <password for above user>
timestamp
maximum 10
wait-time days 0 hours 0 minutes 0 seconds 5
!