Use this when backing up configuration before changes.
Configuration Backup · Rollback & Recovery
Configuration backup saves the current configuration before a change, such as copying running configs to Git or exporting settings, so the previous state can be restored exactly.
1. Configuration backups before changes.
2. Automated and versioned (git).
3. Test restores.
4. Mask secrets.
5. Store off-device.
pre-change backup → change → restore if needed
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
sha256sum <backup-file>Primary Commands
Configuration and operational commands for this Topic.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Command read-back and what it shows Verify boundary
Verification for Rollback & Recovery → Configuration Backup must distinguish state, not merely report that a command ran. With sha256sum <backup-file>, known-good means the selected pre-change artifact has known target/version/time identity, a stable recorded checksum and a demonstrated retrieval/parse path appropriate to the rollback procedure; known-broken/suspicious means no suitable pre-change artifact exists, checksum changes unexpectedly, artifact lineage is ambiguous or recovery tooling cannot consume it. sha256sum <backup-file> shows byte-level integrity of one file relative to a recorded hash, but it does not show compatibility, completeness or successful restoration.
Step 2 Observation-driven branch and next-check logic Narrow the fault
When Rollback & Recovery → Configuration Backup fails, reproduce the smallest original case and capture sha256sum <backup-file> before mutation. Use the observation to choose the next check: if artifact is missing or hash cannot be reproduced, stop the change path; if artifact is intact but target/version metadata is ambiguous, resolve lineage before relying on it; if artifact is trusted, perform a bounded parse/read or restore rehearsal where feasible before change approval.
Step 3 Common mistakes Narrow the fault
- Backups stored on the device.
- Back up configuration before every change.
- Store backups in Git or an archive.
- Test restoring a backup.
ansible-playbook backup.yml— backup configs- Backup before every change (automated) — restore point
- Restore test — proof
ReferenceHow it works1 section · depth on demand
How it works
Rollback & Recovery → Configuration Backup should be reasoned about as a state pipeline, not as one command outcome. The responsible state is rollback artifact selection, pre-change snapshot identity, integrity metadata and the documented mapping from an artifact to the target and change window it can recover. Recovery-safe automation captures or identifies a known pre-change state before mutation and preserves that artifact immutably enough to distinguish it from later snapshots; meanwhile storage durability, encryption, credentials, version compatibility and restore tooling are separate things to check. This distinction is especially important because a backup file can be intact but unusable for the current target/version, and a recent artifact is not necessarily the correct pre-change recovery point.
ReferenceImportant terms & boundaries1 section · depth on demand
Method
In rollback and recovery, a configuration backup taken right before a change is the restore point. A method makes sure it is actually usable.
1. Back up the full running configuration (and startup if different) immediately before the change.
2. Store it off-device with the change ID and timestamp.
3. Verify the backup: non-empty, complete (ends correctly), parseable.
4. Record the restore command and the backup path in the job log.
5. On rollback, restore with an atomic method (configure replace) and verify.
copy running-config scp://backup@10.0.0.5/chg12345/sw01-pre.cfg
configure replace scp://backup@10.0.0.5/chg12345/sw01-pre.cfg list
Documented example, not captured output.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Rollback & Recovery > Configuration Backup. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://learn.microsoft.com/en-us/azure/well-architected/operational-excellence/safe-deployments · confidence 94%