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

backup

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:password1@172.16.20.201’
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 ftp://172.16.20.201’
4. To automatically backup the running-config or startup-config follow the below procedure

R1(Config)#archive
R1(Config-archive)# path ftp://172.16.20.201/r1-config (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 ftp://172.16.20.201/r1-config-3 (name of the desired file)