This topic shows how to use the rollback command to return to the most recently committed JUNOS configuration. The rollback command is useful if you make configuration changes and then decide not to keep the changes.
The following procedure shows how to configure an SNMP health monitor on a JUNOS device and then return to the most recently committed configuration that does not include the health monitor. When configured, the SNMP health monitor provides network management systems (NMS) with predefined monitoring for file system usage, CPU usage, and memory usage on the device.
- user@host> configure
- entering configuration mode
- [edit]
- user@host#
- [edit]
- user@host# show snmp
No snmp statements appear. SNMP has not been configured on the router.
- [edit]
- user@host# set snmp health-monitor
- [edit]
- user@host# show snmp
- health-monitor;
The health-monitor statement indicates that SNMP health monitoring is configured on the router.
- [edit]
- user@host# rollback
- load complete
- [edit]
- user@host# show snmp
No snmp configuration statements appear. The health monitor is no longer configured.
- [edit]
- user@host# commit
- [edit]
- user@host# exit
- Exiting configuration mode
You can also use the rollback command to return to earlier configurations. For more information, see Managing Configurations.