Configuring rollback

The following examples illustrate how to create a checkpoint file, view the rollback/diff patch, revert to a user-defined checkpoint, and view the status of the operation.

Enabling or disabling rollback

Use the enable rollback and no enable rollback commands to enable or disable rollback, respectively.

device(config)# rollback enable

device(config)#no rollback enable
%%WARN: All checkpoints and rollback logs will be cleared!
Do you want to continue? [y/n]:

Creating a default configuration checkpoint

Use the rollback checkpoint command to create a default configuration checkpoint.

device# rollback checkpoint default_config_checkpoint description "Default Config"
Checkpoint default_config_checkpoint creation request by user: admin
Checkpoint default_config_checkpoint creation completed successfully.

Viewing checkpoint details

Use the show rollback checkpoint command to view checkpoint details. The summary option is used here.

device# show rollback checkpoint summary
User checkpoint summary
-------------------------------
1) default_config:
Created by  "admin"
Created at   Tue Jun 12 14:19:49 2018
Size is   4880  bytes
Description:  "Default Config"

2) vlan_config:
Created by  "admin"
Created at   Tue Jun 13 14:19:49 2018
Size is   4872  bytes
Description:  "Vlan Config"

Modify the running configuration

Depending on the requirements, the running configuration can be modified as needed, as shown in the vlan configuration below.

device# conf t
Entering configuration mode terminal
device(config)# vlan 100   
device(config-vlan-100)# name "VLAN 100"
device(config-vlan-100)# exit
device(config)# vlan 200
device(config-vlan-200)# name "VLAN 200"
device(config-vlan-200)# exit
device(config)# no snmp-server enable trap  
device(config)# end

Viewing the diff between a checkpoint and the running configuration

Use the show rollback diff checkpoint command to view a diff between a checkpoint and a running configuration. Entries removed are indicated by "-" and entries added are indicated by "+".

device# show rollback diff checkpoint default_config_checkpoint
!
-snmp-server enable trap 
+!
+vlan 100
+ name VLAN 100
+!
+vlan 200
+ name VLAN 200

The following shows a diff between two checkpoints.

device# show rollback diff checkpoint default checkpoint switchport
interface Ethernet 1/10
- switchport port-security shutdown-time 10
- switchport trunk native-vlan 2
+ switchport port-security max 100

Viewing the patch between a checkpoint and the running configuration

Use the show rollback patch checkpoint command to view a patch between a checkpoint and the running configuration.

device# show rollback patch checkpoint default_config_checkpoint
!
no vlan 200
no vlan 100
!
snmp-server enable trap 
!

Executing rollback

Use the rollback apply checkpoint command to execute a rollback. To rollback the configuration to a specific, saved checkpoint, the rollback configuration name for that checkpoint must be used. Please note that any changes made to the configuration after the checkpoint was taken will be removed when the rollback is performed.

device# rollback apply checkpoint default_config_checkpoint
This operation will modify the running configuration of the system. Do you want to continue? [Y/N]y
% Warning: Configuration Rollback is in-progress.
Please do not abort an ongoing session as it can leave the system with an inconsistent configuration.
......
Rollback completed successfully.

Verifying that the rollback diff is empty

Use the show rollback diff checkpoint command to verify that the diff is empty.

device# show rollback diff checkpoint default_config_checkpoint     
device#

Viewing rollback status

Use the show rollback status command to view rollback status.

device# show rollback status                            
Operation                 :  Rollback To Checkpoint
Checkpoint Name           :  default_config_checkpoint
Rollback done By          :  admin
Rollback Mode             :  Best Effort
Start Time                :  Tue Jun 12 14:27:04 2018
End Time                  :  Thu Jan 12 14:27:31 2018
Time Taken                :  27 seconds
Status                    :  Success
device#

Viewing the rollback log

Use the show rollback log command to view the rollback log.

device# show rollback log
vlan 6
no description
no suppress-arp
no ipv6 mld snooping startup-query-interval
no ip igmp snooping startup-query-interval
no suppress-nd
no router-interface Ve
!
exit
vlan 3
no description
no suppress-arp
no ipv6 mld snooping startup-query-interval
no ip igmp snooping startup-query-interval
no suppress-nd
no router-interface Ve
!
exit
vlan 2
no description
no suppress-arp
no ipv6 mld snooping startup-query-interval
no ip igmp snooping startup-query-interval
no suppress-nd
no router-interface Ve
!
exit
vlan 1
no ipv6 mld snooping startup-query-interval

no ip igmp snooping startup-query-interval
!
exit
no ip access-list standard acl1
no ip mtu
no ipv6 mtu
no mtu
no vrf CFD1722809
event-handler ev1
  action python-script show_interface.py
Error: flash://show_interface.py script for event handler ev1 could not be found or read.
router bgp
  neighbor 1.1.1.1 remote-as 13
Warning: Reset the neighbor session

Viewing rollback log errors

Use the show rollback log errors command to view log errors.

device# show rollback log errors
no bridge-domain 1 p2mp
%Error: One or more specified vlan(s) has a VE configured.
port 50055
% Error: Cannot update/delete port and transport configurations once the Telemetry server is activated.

Viewing current rollback status

Use the show rollback status current command to view current status.

device# show rollback status current 
Operation                 :  Rollback To Checkpoint
Checkpoint Name           :  vlan-config
Rollback done By          :  admin
Rollback Mode             :  best-effort
Start Time                :  Thu Apr  5 09:32:24 2018
Status                    :  In-Progress

Viewing rollback status history

Use the show rollback status history command to view status history.

device# show rollback status history
Operation                 :  Rollback To Checkpoint
Checkpoint Name           :  vlan-config
Rollback done By          :  admin
Rollback Mode             :  best-effort
Start Time                :  Thu Apr  5 09:32:24 2018
End Time                  :  Thu Apr  5 09:32:57 2018
Time Taken For Rollback   :  33 seconds
Status                    :  Success

Operation                 :  Rollback To Checkpoint
Checkpoint Name           :  bgp-config
Rollback done By          :  admin
Rollback Mode             :  best-effort
Start Time                :  Thu Apr  5 07:32:24 2018
End Time                  :  Thu Apr  5 07:32:57 2018
Time Taken For Rollback   :  38 seconds
Status                    :  Success