Configuration archive, rollback and configure replace on Cisco IOS
In short: The IOS archive feature saves a copy of the configuration automatically and can log every command entered. configure replace swaps the running configuration for an archived one, applying only the differences, and configure terminal revert timer rolls back automatically if you lose access during a remote change.
Why bother
Every network engineer has typed a command that cut off their own session: the wrong ACL on the management interface, a typo in a route, a trunk accidentally changed. On a device across the country, that means a site visit. Three IOS features make changes much safer, and they cost nothing.
1. Automatic archives
archive
path flash:archive/$h-
maximum 10
write-memory
time-period 1440
Every time someone saves the configuration (write-memory), and once a day (time-period in minutes), the router saves a numbered copy such as flash:archive/BR1-RTR-3. You can also store archives on a TFTP, SCP or HTTPS server by changing the path. show archive lists the copies.
2. Logging every command
archive
log config
logging enable
logging size 500
notify syslog contenttype plaintext
hidekeys
Every configuration command is recorded with the user and line, and sent to syslog. hidekeys stops passwords appearing in the log. show archive log config all shows the history, which is invaluable when you ask "who changed this?".
3. Comparing and replacing
show archive config differences flash:archive/BR1-RTR-2 system:running-configshows exactly what changed.configure replace flash:archive/BR1-RTR-2 listreplaces the running configuration with the archived one. It works out the differences and applies only the needed commands, so unchanged parts (and active sessions) are not disturbed.listshows each command it applies.
4. The safety net for remote changes
R1# configure terminal revert timer 10
R1(config)# ... make your change ...
R1(config)# end
R1# configure confirm
When you enter configuration mode with a revert timer, the router saves a rollback point. If you do not type configure confirm within 10 minutes, for example because your change cut you off, it rolls back automatically. This is the IOS equivalent of the older trick of scheduling reload in 10 before a risky change, but much faster and without a reload.
Beyond the device
For a whole network, combine these with a central backup tool such as Oxidized, RANCID or NetBox with automation, which collect configurations from every device into Git. The archive feature is still useful as the last copy right next to the device.
Real-world example: the ACL that locked everyone out
An engineer applied a new VTY access list to a remote branch router to limit SSH to the management network. The ACL used the wrong wildcard and blocked the engineer's own subnet. Because the change had been started with configure terminal revert timer 5, the router restored the previous configuration five minutes later. The engineer reconnected, fixed the wildcard and confirmed the change.
Practice
Which command shows the differences between an archived configuration and the running configuration?
show archive config differences <archive> system:running-config.What does configure replace do differently from copying a file to running-config?
What happens if you do not enter configure confirm after configure terminal revert timer 10?
Key takeaways
- The archive feature saves configuration copies on every save and on a schedule.
- log config records every configuration command and who entered it.
- configure replace rolls back cleanly by applying only differences.
- A revert timer protects remote changes from locking you out.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.