Configuring Rollback
This chapter describes how to configure the Rollback feature on Cisco NX-OS devices.
This chapter includes the following sections:
Information About Rollback
This section includes the following topics:
Rollback Overview
The rollback feature allows you to take a snapshot, or user checkpoint, of the Cisco NX-OS configuration and then reapply that configuration to your device at any point without having to reload the device. A rollback allows any authorized administrator to apply this checkpoint configuration without requiring expert knowledge of the features configured in the checkpoint.
Cisco NX-OS automatically creates system checkpoints as described in the “Automatically Generated System Checkpoints” section. You can use either a user or system checkpoint to perform a rollback.
You can create a checkpoint copy of the current running configuration at any time. Cisco NX-OS saves this checkpoint as an ASCII file which you can use to roll back the running configuration to the checkpoint configuration at a future time. You can create multiple checkpoints to save different versions of your running configuration.
When you roll back the running configuration, you can trigger the following rollback types:
- atomic—Implement a rollback only if no errors occur.
- best-effort—Implement a rollback and skip any errors.
- stop-at-first-failure—Implement a rollback that stops if an error occurs.
The default rollback type is atomic.
When you are ready to roll back to a checkpoint configuration, you can view the changes that will be applied to your current running configuration before committing to the rollback operation. If an error occurs during the rollback operation, you can choose to cancel the operation, or ignore the error and proceed with the rollback. If you cancel the operation, Cisco NX-OS provides a list of changes already applied before the error occurred. You need to clean up these changes manually.
Automatically Generated System Checkpoints
The Cisco NX-OS software automatically generates system checkpoints to help you avoid a loss of configuration information. System checkpoints are generated by the following events:
- Disabling an enabled feature with the no feature command
- Removing an instance of a Layer 3 protocol, such as with the no router bgp command or the no ip pim sparse-mode command
- License expiration of a feature
If one of these events causes system configuration changes, the feature software creates a system checkpoint that you can use to roll back to the previous system configuration.
The system generated checkpoint filenames begin with “system-” and include the feature name. For example, the first time that you disable the EIGRP feature, the system creates the checkpoint named system-fm-__inst_1__eigrp.
High Availability
Whenever a checkpoint is created using the checkpoint or checkpoint checkpoint_name commands, the checkpoint is synchronized to the standby unit.
Rollback remembers the states of the checkpoint operation, so if the checkpoint operation is interrupted and the system is left in an inconsistent state, rollback can complete the checkpoint operation (synchronize the checkpoint with the standby unit) before proceeding with the rollback operation.
Your checkpoint files are still available after a process restart or supervisor switchover. Even if there is an interruption during the process restart or supervisor switchover, the checkpoint will complete successfully before proceeding with the operation. In a supervisor switchover, the checkpoint is completed on the new active unit.
If a process restart or supervisor switchover occurs during a rollback operation, after the restart or switchover completes, the rollback will resume from its previous state and complete successfully.
Virtualization Support
Cisco NX-OS creates a checkpoint of the running configuration in the virtual device context (VDC) that you are logged into. You can create different checkpoint copies in each VDC. You cannot apply the checkpoint of one VDC into another VDC. By default, Cisco NX-OS places you in the default VDC. See the Cisco Nexus 7000 Series NX-OS Virtual Device Context Configuration Guide, Release 5.x.
VDC configuration does not support checkpoints for any operations, including (but not limited to) VDC creation, VDC deletion, VDC suspension, VDC reloading, VDC renaming, VDC interface allocation, shared interface allocation, FCoE VLAN allocation, resource allocation, and resource templates. You should create your checkpoint from within a specific VDC.
Licensing Requirements
|
|
Cisco NX-OS |
The rollback feature requires no license. Any feature not included in a license package is bundled with the Cisco NX-OS system images and is provided at no extra charge to you. For a complete explanation of the Cisco NX-OS licensing scheme, see the Cisco NX-OS Licensing Guide. |
Prerequisites for Rollback
If you configure VDCs, install the Advanced Services license and go to the specific VDC. For more information, see the Cisco Nexus 7000 Series NX-OS Virtual Device Context Configuration Guide, Release 5.x.
To configure the rollback feature, you must have network-admin or vdc-admin user privileges.
Guidelines and Limitations
Rollback has the following configuration guidelines and limitations:
- You can create up to ten checkpoint copies per VDC.
- You cannot apply the checkpoint file of one VDC into another VDC
- You cannot apply a checkpoint configuration in a nondefault VDC if there is a change in the global configuration portion of the running configuration compared to the checkpoint configuration.
- Your checkpoint filenames must be 80 characters or less.
- You cannot start a checkpoint filename with the word system.
- Beginning in Cisco NX-OS Release 4.2(1), you can start a checkpoint filename with the word auto.
- Beginning in Cisco NX-OS Release 4.2(1), you can name a checkpoint file summary or any abbreviation of the word summary.
- Only one user can perform a checkpoint, rollback, or copy the running configuration to the startup configuration at the same time in a VDC.
- After the system executes the write erase or reload command, checkpoints are deleted. You can use the clear checkpoint database command to clear out all checkpoint files.
- A rollback fails for NetFlow if during a rollback, you try to modify a record that is programmed in the hardware.
- Although rollback is not supported for checkpoints across software versions, users can perform rollback at their own discretion and can use the best-effort mode to recover from errors.
- When checkpoints are created on bootflash, differences with the running-system configuration cannot be performed before performing the rollback, and the system reports “No Changes.”
- Checkpoints are local to a virtual device context (VDC).
- Checkpoints created using the checkpoint and checkpoint checkpoint_name commands are present upon a switchover for all VDCs.
- Checkpoints created in the default VDC are present upon reload unless a write-erase command is issued before a reload.
- Checkpoints created in nondefault VDCs are present upon reload only if a copy running-config startup-config command is issued in the applicable VDC and the default VDC.
- Rollback to files on bootflash is supported only on files created using the checkpoint checkpoint_name command and not on any other type of ASCII file.
- Checkpoint names must be unique. You cannot overwrite previously saved checkpoints with the same name.
- Rollback is not supported in the storage VDC.
Default Settings
Table 10-1 lists the default settings for rollback parameters.
Table 10-1 Default Rollback Parameters
|
|
rollback type |
atomic |
Configuring Rollback
This section includes the following topics:
Note Be aware that the Cisco NX-OS commands may differ from the Cisco IOS commands.
Creating a Checkpoint
You can create up to ten checkpoints of your configuration per VDC.
BEFORE YOU BEGIN
Make sure that you are in the correct VDC. To change the VDC, use the switchto vdc command.
SUMMARY STEPS
1. checkpoint {[ cp-name ] [ description descr ] | file filename }
no checkpoint cp-name
2. show checkpoint cp-name [ all ]
DETAILED STEPS
|
|
|
Step 1 |
checkpoint {[ cp-name ] [ description descr ] | file filename } Example: switch# checkpoint stable |
Creates a checkpoint of the running configuration to either a user checkpoint name or a file. The checkpoint name can be any alphanumeric string up to 80 characters but cannot contain spaces. If you do not provide a name, Cisco NX-OS sets the checkpoint name to user-checkpoint- number where number is from 1 to 10. The description can contain up to 80 alphanumeric characters, including spaces. |
no checkpoint cp-name Example: switch# no checkpoint stable |
You can use the no form of the checkpoint command to remove a checkpoint name. Use the delete command to remove a checkpoint file. |
Step 2 |
show checkpoint cp- name [ all ] Example: switch# show checkpoint stable |
(Optional) Displays the contents of the checkpoint name. |
Implementing a Rollback
You can implement a rollback to a checkpoint name or file. Before you implement a rollback, you can view the differences between source and destination checkpoints that reference current or saved configurations.
For information about automatically generated system checkpoints, see the “Automatically Generated System Checkpoints” section.
Note If you make a configuration change during an atomic rollback, the rollback will fail.
BEFORE YOU BEGIN
You are logged in to the device in EXEC mode for the correct VDC. To go to the correct VDC, use the switchto vdc command.
SUMMARY STEPS
1. show diff rollback-patch { checkpoint src-cp-name | running-config | startup-config | file source-file } { checkpoint dest-cp-name | running-config | startup-config | file dest-file }
2. rollback running-config { checkpoint cp-name | file cp-file } [ atomic | best-effort | stop-at-first-failure ]
DETAILED STEPS
|
|
|
Step 1 |
show diff rollback-patch { checkpoint src-cp-name | running-config | startup-config | file source-file } { checkpoint dest-cp-name | running-config | startup-config | file dest-file } Example: switch# show diff rollback-patch checkpoint stable running-config |
Displays the differences between the source and destination checkpoint selections. |
Step 2 |
rollback running-config { checkpoint cp-name | file cp-file } [ atomic | best-effort | stop-at-first-failure ] Example: switch# rollback running-config checkpoint stable |
Creates a rollback to the specified checkpoint name or file. You can implement the following rollback types:
- atomic—Implement a rollback only if no errors occur.
- best-effort—Implement a rollback and skip any errors.
- stop-at-first-failure—Implement a rollback that stops if an error occurs.
The default is atomic. This example shows how to implement a rollback to a user checkpoint name. |
Verifying the Rollback Configuration
To display rollback configuration information, perform one of the following tasks:
|
|
show checkpoint name [ all ] |
Displays the contents of the checkpoint name. |
show checkpoint all [ user | system ] |
Displays the contents of all checkpoints in the current VDC. You can limit the displayed checkpoints to user or system generated checkpoints. |
show checkpoint summary [ user | system ] |
Displays a list of all checkpoints in the current VDC. You can limit the displayed checkpoints to user or system generated checkpoints. |
show diff rollback-patch { checkpoint src-cp-name | running-config | startup-config | file source-file } { checkpoint dest-cp-name | running-config | startup-config | file dest-file } |
Displays the differences between the source and destination checkpoint selections. |
show rollback log {exec | verify} |
Displays the contents of the rollback log. |
Use the clear checkpoint database command to delete all checkpoint files.
Configuration Example for Rollback
This example shows how to create a checkpoint file and then implements a best-effort rollback to a user checkpoint name:
checkpoint stable
rollback running-config checkpoint stable best-effort
Additional References
For additional information related to implementing a rollback, see the following sections:
Related Documents
|
|
Rollback CLI commands |
Cisco Nexus 7000 Series NX-OS System Management Command Reference |
Configuration files |
Cisco Nexus 7000 Series NX-OS Fundamentals Configuration Guide, Release 5.x |
VDCs |
Cisco Nexus 7000 Series NX-OS Virtual Device Context Configuration Guide, Release 5.x |
Standards
|
|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature. |
— |
Feature History for Rollback
Table 10-2 lists the release history for this feature.
Table 10-2 Feature History for Rollback
|
|
|
Rollback feature |
5.2(1) |
No change from Release 5.1. |
Rollback feature |
5.1(1) |
No change from Release 5.0. |
Rollback feature |
5.0(2) |
No change from Release 4.2. |
High Availability |
4.2(1) |
Checkpoint and rollback operations support high availability. See the “High Availability” section. |
Guidelines and Limitations |
4.2(1) |
Checkpoint file naming conventions changed. Rollback to files on bootflash is supported only on files created using the checkpoint checkpoint_name command. See the “Guidelines and Limitations” section. |
Automatically generated system checkpoints |
4.2(1) |
The software automatically generates a system checkpoint when disabling a feature or license expiration could cause loss of configuration information. See the “Automatically Generated System Checkpoints” section. |
Guidelines and Limitations |
4.1(3) |
A rollback fails for NetFlow if during rollback, you try to modify a record that is programmed in the hardware. A rollback is not supported for checkpoints across software versions. See the “Guidelines and Limitations” section. |