Cisco has simple method for backup config
mkdir flash:/archive
conf t
archive
log config
logging enable
hidekeys
path flash:archive/config
write-memory
you can use other options like path tftp,scp... etc
also notify syslog contenttype plaintext if you want write to log
for check archive:
show archive log config all
show archive config differences flash:archive/config-1 system:running-config