Use this when backing up Cisco configs automatically.
Configuration Collection
Configuration collection backs up device configs automatically, such as show running-config via Netmiko, Oxidized or RANCID, storing them in Git so changes can be compared over time.
1. Collect configs regularly.
2. Store in git.
3. show archive for on-device versions.
4. Mask secrets.
5. Diff changes.
device → collect → git
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show running-configShow Commands
Read-only and diagnostic commands for confirming state, narrowing a fault and interpreting the current boundary.
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 Prove collection completeness against raw Cisco state Verify boundary
Verify the collection by reconciling expected inventory count with successful per-device acquisitions, then sample raw responses against the parsed records for identifiers and feature fields that matter to the intended use. Record command/API resource, platform, software version and collection time so later comparisons use equivalent inputs. For paginated APIs, confirm the final page or total count rather than trusting the first response status. A parse with no errors shows parser completion only, but it does not show that every intended Cisco device or every requested field was collected.
Step 2 Known-good, broken and when it is fixed Verify boundary
Verification for Cisco Automation → Configuration Collection must discriminate known-good from broken/suspicious state. With show running-config, known-good is: read-back contains the intended configuration on the intended device/context. Broken/suspicious is: missing/unexpected configuration shows source/render/deployment drift. Read back the same target after the minimal approved change, then compare intended config/source artifact and operational state; running config alone does not show service behavior.
Step 3 Verification path Verify boundary
To verify Configuration Collection, first record device ID/management address, request/run ID, configuration object/interface and revision. Then check the result reported by the tool, and finally read the Cisco device configuration and operational/forwarding state directly and compare it with what you intended.
Also test the cases that usually go wrong: wrong device/platform, parser mismatch, partial fleet success, configuration overwrite, API/CLI semantic mismatch and treating accepted config as forwarding evidence.
Step 4 Distinguish reachability, authorization, collection and parsing gaps Narrow the fault
If a Cisco device is missing from the collection, first show it was in the selected inventory and that its management endpoint resolved to the expected node. A transport timeout points to reachability or session establishment; an authorization or command error points to privilege/RBAC or platform support; an HTTP/RPC success with incomplete data points to pagination, filter or resource scope. If raw output is complete but fields disappear after ingestion, freeze the raw sample and inspect parser or schema drift. Never “repair” a partial parsed dataset by assuming absent fields mean disabled features.
Step 5 Common mistakes Narrow the fault
- Backups without timestamps or diffs.
Step 6 Observation-driven troubleshooting tree Narrow the fault
Troubleshoot Cisco Automation → Configuration Collection from one exact failing target, revision/input and timestamp. Capture show running-config before mutation, then branch by the first divergent observation: connection/AAA fails, stay at management path; output is truncated/paginated or privilege-limited, fix collection context; running config is complete but differs unexpectedly, distinguish intentional live change from drift; stored artifact differs from capture, troubleshoot normalization/transport to repository. Typical failure signatures include wrong device or VRF, insufficient privilege, paginated/truncated output, secret-redaction that deletes semantic lines, stale cached collection, or a repository artifact that does not match the device read-back.
Step 7 Failure signatures, dependencies and operational guardrails Narrow the fault
Failure-signature and guardrail reference for Cisco Automation → Configuration Collection: Wrong device or VRF, insufficient privilege, paginated/truncated output, secret-redaction that deletes semantic lines, stale cached collection, or a repository artifact that does not match the device read-back. Operational guardrail: show running-config shows effective running configuration on that device/context at capture time, but it does not show startup persistence or protocol/service health. Dependencies that can mimic the same symptom are DNS/management VRF, SSH/NETCONF/API reachability, AAA privilege, command authorization, terminal pagination, platform syntax, config size and the storage/version-control destination.
Step 8 Where it fails Narrow the fault
Trace a failure along the path it takes: inventory/controller → transport/API/CLI → parser/model → device config/control plane → operational state → forwarding/read-back.
Typical problems with Configuration Collection: wrong device/platform, parser mismatch, partial fleet success, configuration overwrite, API/CLI semantic mismatch and treating accepted config as forwarding evidence.
Before you retry a change, read the target's current state first, using device ID/management address, request/run ID, configuration object/interface and revision.
- Store configs in Git.
- Diffs show changes.
- Schedule regular collection.
ansible <dev> -m cisco.ios.ios_config -a 'backup=yes'— backup running configshow archive— archive config versions- Git-stored configs — history
ReferenceWhy it matters1 section · depth on demand
Cisco collection must preserve device and acquisition context
Cisco Automation configuration collection is not just a text download. A useful collection binds raw CLI, NETCONF or controller/API data to the intended device identity, platform and software release, privilege context, collection command or resource, timestamp and parser/schema version. Pagination, command authorization and controller inventory aliases can silently make a collection partial. Raw response and parsed model should therefore be retained as separate evidence so parser changes cannot rewrite history and a device with the same hostname cannot be confused with a different serial, UUID or management endpoint.
ReferenceHow it works2 sections · depth on demand
In depth
Configuration collection on Cisco devices retrieves running (and optionally startup) configuration from every device on a schedule and stores it with history. It enables diffing, compliance checks and restore.
| Method | Command/API |
|---|---|
| CLI | show running-config (use show running-config all only if defaults matter) |
| NETCONF | <get-config source=running> |
| RESTCONF | GET /restconf/data/Cisco-IOS-XE-native:native |
| Archive feature | Device pushes config to a server on each save |
archive
path scp://backup@10.0.0.5/configs/$h-
write-memory
Documented example, not captured output.
Normalise output before storing (remove timestamps like ! Last configuration change) so diffs show only real changes.
How it works
Cisco Automation → Configuration Collection owns device identity and context, management transport/AAA, collection command scope, running configuration read-back, normalization/redaction and storage of the collected artifact. Execution mechanics: Collection connects to the intended device and privilege context, executes bounded read commands, captures the active configuration, removes only deliberately volatile or secret material and stores the result with target/revision/time metadata for later comparison. Keep adjacent dependencies separate: DNS/management VRF, SSH/NETCONF/API reachability, AAA privilege, command authorization, terminal pagination, platform syntax, config size and the storage/version-control destination. The mapped read surface show running-config exposes effective running configuration read back from the network device.
ReferenceImportant terms & boundaries2 sections · depth on demand
Platform, version and operating-envelope scope
Configuration collection works over SSH/CLI on all Cisco platforms; NETCONF/RESTCONF availability and YANG model coverage depend on the platform (IOS XE, NX-OS, IOS XR) and software release.
Mechanics
Cisco Automation → Configuration Collection is owned at runtime by the automation client/controller plus Cisco device management API/CLI and the device configuration/control plane. Durable intent is versioned device inventory, transport/API selection, desired configuration/state query and verification policy; stable identity is device ID/management address, request/run ID, configuration object/interface and revision. The consumer-visible target is the Cisco device configuration and operational/forwarding state. The operating invariants are that device identity and platform are explicit, transport/API semantics are version-aware, config changes are bounded and operational state is independently verified. Follow the chain of components inventory/controller → transport/API/CLI → parser/model → device config/control plane → operational state → forwarding/read-back and record which layer currently owns truth.
ReferenceConfiguration & state1 section · depth on demand
Lifecycle
A fresh noninteractive execution should be reproducible from source-controlled intent plus documented prerequisites, and the release must retain enough identity to tie every result back to device ID/management address, request/run ID, configuration object/interface and revision.
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 Cisco Automation > Configuration Collection. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://developer.cisco.com/site/networking/ · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
Capture at minimum device, platform/version, request/run ID, API/CLI operation, config diff, response/error, operational fields and verification.