Cisco Nexus NX-OS Checkpoint and Rollback Guide - 夜莺博客

Cisco Nexus NX-OS Checkpoint and Rollback Guide

NX-OS does not keep an IOS-XR-style commit history, so on Nexus switches the equivalent safety net is the checkpoint and rollback feature: you snapshot the running configuration to a named checkpoint, make your changes, and if something breaks you roll the running configuration back to that snapshot. NX-OS even creates system checkpoints automatically when you disable a feature or remove a protocol instance. This guide covers creating checkpoints on Nexus 9000 and 3000 series, previewing the change with a diff, and executing atomic and best-effort rollbacks.

How NX-OS Checkpoints Work

A checkpoint stores the full running configuration. You can keep up to ten named checkpoints per switch; each is synchronized to the standby supervisor and survives reloads - but a write erase followed by reload deletes them, and they are local to the switch (you cannot apply one switch's checkpoint to another).

Creating a Checkpoint

switch# checkpoint stable
switch# checkpoint before-ospf-change description "pre-OSPF maintenance"

Name one anything up to 80 characters; unnamed checkpoints become user-checkpoint-1 through -10.

Previewing the Rollback with a Diff

Before committing to a rollback, compare the checkpoint with the current running configuration. This shows exactly what the rollback will add, remove or change:

switch# show diff rollback-patch checkpoint stable running-config
switch# show checkpoint stable
switch# show checkpoint summary

Rolling Back the Running Configuration

switch# rollback running-config checkpoint stable atomic

Atomic rollback (the default) applies the whole rollback only if no errors occur - if any command fails, the configuration is left unchanged. For recoveries where you accept partial application, use best-effort mode:

switch# rollback running-config checkpoint stable best-effort

During an atomic rollback do not make other configuration changes on the switch or from another session; a concurrent change causes the rollback to fail.

Guidelines and Limitations

  • Only one checkpoint, rollback or copy running-config to startup-config operation may run at a time.
  • Checkpoint names must be unique; you cannot overwrite an existing checkpoint of the same name.
  • Rollback is not supported for auto-configurations or across software versions.
  • Verify the result and save it: after a rollback, copy the running configuration to startup so the recovered state survives a reload.
switch# show rollback log verify
switch# copy running-config startup-config

Related articles: Cisco Nexus NX-OS VLAN trunk configuration, Nexus vPC failover troubleshooting, and Arista EOS configuration session rollback.

原文链接:https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus9000/sw/93x/system-management/b-cisco-nexus-9000-series-nx-os-system-management-configuration-guide-93x/b-cisco-nexus-9000-series-nx-os-system-management-configuration-guide-93x_chapter_011001.html