Define the location of your configuration save apart from the default Flash location. Based on your IOS support, this can be a HTTP, HTTPS, FTP, or TFTP path. I am taking the backup using tftp.
The following commands is used to enable archive and define the path, while third command is used that when ever someone copy configuration to NVRAM so it will take backup also.
PSW-DXX (config) # archive
PSW-DXX (config-archive)# path tftp://10.110.1.22/
PSW-DXX(config-archive) # write-memory
If you want to suppress the display of password information in configuration log files, use the hidekeys command in configuration change logger configuration mode. or To allow the display of password information in configuration log files, use the no form of this command
PSW-DXX (config)# archive
PSW-DXX (config-archive)# log config
PSW-DXX (config-archive-log-cfg)# hidekeys or no hidekeys
PSW-DXX (config-archive-log-cfg)# exit
To enable the logging of configuration changes, use the logging enable command in configuration change logger configuration mode. To disable the logging of configuration changes, use the no form of this command.
PSW-DXX (config-archive-log-cfg)# logging enable
or
PSW-DXX (config-archive-log-cfg)# no logging enable
To specify the maximum number of entries retained in the configuration log, use the logging size command in configuration change logger configuration mode. By default value is 100. To reset the default value, use the no form of this command.
PSW-DXX (config-archive-log-cfg)# logging size 200
2. KRON
Define the policy list for the scheduler. The following is calling the "write config" command which will trigger the copy over network from the above:
PSW-DXX (config) # kron policy-list backup-config
PSW-DXX (config-kron-policy) # cli write memory
Define the schedule of the policy. The following example is for ten minutes past evening, everyday:
PSW-DXX (config) # kron occurrence daily-config-backup at 05:10 recurring
PSW-DXX (config-kron-occurrence) # policy-list backup-config
Note: Every time the "write memory" command is issued, the device will trigger a network copy to the path specified above.
I hope this will be informative for you. :)
Cheers :)