Lab auto-07 - Capstone: Automated Config Backup and Drift Detection

Build an automated config backup and drift detector with Netmiko: snapshot every device to a golden baseline, re-check the fleet on demand, and print a unified diff with a nonzero exit code your scheduler can alarm on. Captured on CML Free.

Backup & Drift Capstone - PingLabz CCNA lab featured image

Every network has a network engineer who swears nothing changed, and a network that disagrees. This capstone builds the tool that settles the argument: an automated backup and drift detector that snapshots every device config to a golden baseline, re-checks the fleet on demand, and prints a unified diff of exactly what changed, on which device, with a nonzero exit code your scheduler can alarm on. It is the final lab of the PingLabz CCNA Automation Labs and it uses everything the series taught: Netmiko sessions (auto-01), device loops (auto-02), enable mode (auto-03), and a JSON inventory (auto-04). All output below is captured from the live CML Free lab.

This is also the point of the whole series, stated plainly: Domain 6 is not on the exam because Cisco wants you to recite "REST uses HTTP verbs." It is there because the working network engineer of the next decade keeps a tool like this one running against every network they touch.

What you will learn

  • How to design a two-mode CLI tool (baseline / check) around the golden-config concept.
  • How to strip volatile lines from a running config so diffs show real changes, not timestamp noise.
  • How to produce unified diffs with Python's standard library and signal drift through exit codes.
  • How this maps to the real-world practice the exam calls configuration drift and version control.

Read next