Automatically backup and restore configuration on Cisco Router from FTP/TFTP server


Backing up configuration –

Configuration & IOS file of router or switch can be backed up in a ftp or tftp server. In the below example we will use the FTP server

1. Create a FTP server with user id & password authentication
2. On the Router give command ‘copy startup-config ftp://username:[email protected]
3. To save the login credential configure the ftp server login details on router. -> ‘ip ftp username ftpuser’. ‘ip ftp password password1’.After saving the username and password on router we can directly use the command ‘copy startup-config’
4. To automatically backup the running-config or startup-config follow the below procedure

R1(Config-archive)# path (name of the file will be created as – r1-config-1…2)
R1(Config-archive)# write memory (To save the config file on ftp during write memory command applied)
R1(Config-archive)# time-period 60 mins (This will auto save the running config on to FTP after 1 hour)
R1# show archive (To check the configuration file backup)

To rollback a configuration –

R1# configure replace (name of the desired file)