Configuring Rollback

This chapter contains the following sections:

Information About Rollbacks

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 switch at any point without having to reload the switch. A rollback allows any authorized administrator to apply this checkpoint configuration without requiring expert knowledge of the features configured in the checkpoint.

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 an atomic rollback. An atomic rollback implements a rollback only if no errors occur.

Guidelines and Limitations for Rollbacks

A rollback has the following configuration guidelines and limitations:

  • You can create up to ten checkpoint copies.

  • You cannot apply the checkpoint file of one switch into another switch.

  • Your checkpoint file names must be 75 characters or less.

  • You cannot start a checkpoint filename with the word system.

  • You can start a checkpoint filename with the word auto.

  • 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.

  • After you enter the write erase and reload command, checkpoints are deleted. You can use the clear checkpoint database command to clear out all checkpoint files.

  • 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 switch.

  • Checkpoints that are created using the checkpoint and checkpoint checkpoint_name commands are present upon a switchover for all switches.

  • A rollback to files on bootflash is supported only on files that are 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.

  • 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 switch.

SUMMARY STEPS

  1. switch# checkpoint { [cp-name] [description descr] |file file-name
  2. (Optional) switch# no checkpointcp-name
  3. (Optional) switch# show checkpointcp-name

DETAILED STEPS

  Command or Action Purpose

Step 1

switch# checkpoint { [cp-name] [description descr] |file file-name

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.

Step 2

(Optional) switch# no checkpointcp-name

Example:

switch# no checkpoint stable
(Optional)

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 3

(Optional) switch# show checkpointcp-name

Example:

[ all]

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.


Note


If you make a configuration change during an atomic rollback, the rollback will fail.


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

DETAILED STEPS

  Command or Action Purpose

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

Example:

switch# rollback running-config checkpoint stable

Creates an atomic rollback to the specified checkpoint name or file if no errors occur.

Example

The following example shows how to create a checkpoint file and then implement an atomic rollback to a user checkpoint name:

switch# checkpoint stable
switch# rollback running-config checkpoint stable atomic

Verifying the Rollback Configuration

Use the following commands to verify the rollback configuration:

Command Purpose
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 switch. 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 switch. 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.

Note


Use the clear checkpoint database command to delete all checkpoint files.