Use it to set up backups, check that they actually run, or find what changed between two dates.
Configuration Backup · Network Automation
Configuration backup copies every device's configuration off the device on a schedule, with name, time and a way to compare versions — so a change can be undone and a replaced device restored.
1. Config backups: collect running configs regularly, store in git.
2. Diff between versions.
3. Alert on failures/missing devices.
4. Mask secrets (or protect repo).
5. Used for restore and compliance.
devices → collect config → git commit → diff/alerts
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 Operational evidence path Verify boundary
device identity → auth/collection method → config source → raw capture → completeness/redaction/normalization → integrity/versioned storage → diff/recovery use → restore validation
Healthy evidence: snapshots are complete, attributable, timestamped, integrity-protected and periodically confirmed usable for comparison/recovery.
Step 2 Command read-back and what it shows Verify boundary
Verification for Network Automation → Configuration Backup must distinguish state, not merely report that a command ran. With sha256sum <backup-file>, known-good means a fresh artifact is tied to the correct device and timestamp, has a recorded checksum distinct when configuration changed, contains the expected configuration scope, and can be retrieved/read for recovery; known-broken/suspicious means artifact is missing, stale, truncated, associated with the wrong target, silently overwritten without lineage, or cannot be read back when requested. sha256sum <backup-file> shows the bytes of one local artifact have a specific hash, but it does not show capture completeness, device identity or restorability.
Step 3 Common mistakes Verify boundary
- Backups without diffs or alerts.
Step 4 Verification path Verify boundary
Record device ID/management address, platform/version, interface/VRF/object identity and request/run ID; inspect the runtime/control-plane result; then query network-device configuration and operational/forwarding state relevant to the change through an independent read path and compare it with the versioned intent. For Network Automation → Configuration Backup, the evidence must connect the control-plane result to network-device configuration and operational/forwarding state relevant to the change and explain any gap between desired, controller-reported and consumer-visible state.
Step 5 Failure modes and next checks Narrow the fault
Suspicious evidence: files are silently truncated, normalized incompatibly, contain unprotected secrets or cannot be mapped to the intended device/config source.
Step 6 Observation-driven branch and next-check logic Narrow the fault
When Network Automation → Configuration Backup fails, reproduce the smallest original case and capture sha256sum <backup-file> before mutation. Use the observation to choose the next check: if no new artifact appears, inspect collection job/transport/authentication; if artifact exists but checksum/size is unchanged unexpectedly, compare capture timestamp and device change history; if artifact is fresh but restore usefulness is uncertain, parse key sections and perform bounded restore/readability validation.
Step 7 Where it fails Narrow the fault
Failure analysis for Network Automation → Configuration Backup should follow the path through the components: inventory/controller → transport/API/CLI → device parser/model/datastore → control plane → forwarding/operational read-back. Common failure classes include wrong device/context, syntax/model drift, privilege mismatch, partial config, asynchronous convergence and controller cache differing from device truth. Before retrying a mutating operation, read current target state using the stable identity device ID/management address, platform/version, interface/VRF/object identity and request/run ID; if state is unknown, stop broad retries.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
A backup that is never checked will be missing when needed: watch for devices that were skipped. Store copies off the device (Git, a server), not only in flash. Passwords and keys in the copies must be protected. Test a restore now and then.
ansible-playbook backup.yml— collect running configsgit -C configs log --oneline -5— versioned backups- Backup failure alerts — coverage
ReferenceWhat it is1 section · depth on demand
Core model
Separate collection success, source configuration type, completeness, normalization/redaction, immutable storage and actual restore usability.
ReferenceHow it works2 sections · depth on demand
How it works
Network Automation → Configuration Backup should be reasoned about as a state pipeline, not as one command outcome. The responsible state is device identity, collection timestamp, running/startup configuration source, backup artifact integrity and retention/version lineage. A configuration backup workflow connects to a specific device/state surface, serializes the returned configuration into an artifact and records enough identity and integrity data to distinguish one capture from another; meanwhile AAA, transport reachability, command privilege, secret redaction, storage permissions and retention are independent things to check. This distinction is especially important because a file existing in the backup directory does not show it came from the intended device or contains a complete current configuration.
In depth
Configuration backup regularly saves each device's running configuration to a versioned store, so changes can be reviewed and devices restored. It is usually the first network automation task an organisation adopts.
| Approach | Tools |
|---|---|
| Dedicated backup tool | Oxidized, RANCID |
| Ansible | cisco.ios.ios_config: backup: true |
| Python | Netmiko show running-config to Git |
- cisco.ios.ios_config:
backup: true
backup_options: { dir_path: backups/, filename: "{{ inventory_hostname }}.cfg" }
Commit backups to Git so git diff shows exactly what changed between days, and mask secrets before storing.
ReferenceImportant terms & boundaries2 sections · depth on demand
What this shows and what it does not
A retained configuration snapshot shows captured text/data at a point in time, not that it is complete, current, secret-safe or directly restorable.
Mechanics
Network Automation → Configuration Backup is owned at runtime by the automation controller/client plus network-device API/CLI/model interface and device control plane. Its durable intent is versioned device inventory and bounded network configuration/verification intent; the stable identity contract is device ID/management address, platform/version, interface/VRF/object identity and request/run ID. The consumer-visible target is network-device configuration and operational/forwarding state relevant to the change. The operating invariants are that device/platform capability is known, scope is explicit, parsing/model assumptions match software, writes are read back and control-plane versus forwarding verification remain distinct. Follow the chain of components inventory/controller → transport/API/CLI → device parser/model/datastore → control plane → forwarding/operational read-back and record which layer currently owns truth. The linked authority for bounded mechanics is Cisco DevNet — Network Automation; documentation support is separate from observed lab/production Evidence.
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 Network Automation > Configuration Backup. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://developer.cisco.com/site/networking/ · confidence 94%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Configuration Backup Network Automation proof-boundary map
Fast intent/scope, management-operation, device-state and network-acceptance boundaries for Configuration Backup.
| Boundary | Healthy evidence | Suspicious evidence |
|---|---|---|
| Intent / scope | Source revision and exact targets are explicit | Stale inventory, hidden selector or wrong variables change scope |
| Management operation | Transport/model/payload and per-device response are traceable | Auth/capability/parser differences hide partial or wrong execution |
| Device state | Effective and persistent state are read back | Accepted config/API result is mistaken for convergence |
| Network proof | Original control/data-plane or service test passes | Automation summary substitutes for actual network acceptance |
Deep reference
Healthy vs suspicious evidence
Output interpretation
Capture at minimum device/platform, request/command/RPC ID, config diff, parser/API result, operational state, counters/routes/neighbors and final service verification.