Skip to navigation

Configuration Backup

View as MarkdownOpen in Claude

The Configuration Backup workflow pulls the running configuration from a network device, compares it against the intended configuration that Config Manager would deploy, and persists the snapshot to the Config Store. It captures what a device is running and detects drift from the rendered intent supplied by the configured DCIM provider. Nautobot is the bundled provider.

For a site-wide snapshot, use Site Configuration Backup to back up every in-scope device in parallel.

The workflow runs directly from the Config Manager UI for ad-hoc backups, on a schedule for routine snapshots (see Workflow Schedulers), and as a child workflow at the end of Reprovision and Deploy runs.

Prerequisites

Before running a backup, confirm the following are in place:

  • Device exists in the configured DCIM with a primary IPv4, platform, and the access and configuration data required by that platform. The workflow resolves the provider’s device identifier before connecting. With Nautobot, this is the device UUID.
  • Device is reachable from Config Manager over the management network, and credentials for the device are present in the secrets store. The workflow uses NVUE to pull the running configuration on Cumulus Linux devices.
  • Intended configuration is available for the device — that is, the Render Service has produced a rendered config in the Config Store. Drift detection compares the running config against this rendered output. If no intended config exists yet, drift detection will fail, unless rendering is disabled for the device (see Drift detection behavior).
  • Device ID and platform are available from the DCIM provider. Config Manager derives the backup path from the device ID and the platform’s configuration filename, writes the snapshot to the Config Store, and records its metadata through the provider.
  • User attribution is present. Backups invoked through the API carry the requesting user automatically; backups invoked from another workflow forward the originating user. The workflow rejects requests with no user attached.

Running the workflow

  1. Navigate to the Config Manager URL for your environment.
  2. In the Config Manager UI, click New workflow (+) in the upper-right corner and select Configuration Backup.
  3. Fill in the form using the field reference below and submit.

The workflow form takes the following inputs:

FieldDescriptionRequired
SiteThe site whose device you want to back up. Drives the device list below.Yes
TenantOptional DCIM tenant filter to narrow the device list.No
StatusOptional device-status filter to narrow the device list (for example, Provisioned).No
DeviceThe target device. The list is filtered by the selections above.Yes

After submission, a status page appears showing each stage as it runs. A typical backup completes in under a minute against a healthy, reachable device.

Execution stages

The workflow defines three stages. The first two run in parallel; the third depends on both and runs once they finish. None of the stages require manual approval.

  1. load_running_configuration — Pull the running config from the device.

    Fetches the device record from the configured DCIM, attaches device search attributes to the workflow for observability, and then calls the load_running_configuration activity to read the device’s running configuration. The activity has a 5-minute start-to-close timeout and allows at most 3 total attempts (including the initial attempt) on transient errors.

    The captured configuration is included in the stage output so it is visible on the workflow status page.

  2. check_drift — Compare running vs. intended configuration.

    If the caller already supplied an intended_config_commit_id, the stage short-circuits and reports no drift — this is the path Deploy workflows take, because they just applied the intended config and do not want their own change flagged.

    Otherwise, the stage loads the intended configuration for the device from the Config Store and runs perform_candidate_diff to compare it against what is on the device. The diff output is included in the stage display, and the commit ID of the intended configuration is recorded so the persist stage can mark the backup as matching that commit. The diff activities have a 1-minute timeout and allow at most 3 total attempts (including the initial attempt).

  3. persist_backup — Write the snapshot to the Config Store and record it on the device.

    Persists the running configuration to the Config Store with a commit message of the form Backup trigger: <TRIGGER> User: <user>, then records the backup metadata through the configured DCIM provider. The record includes the originating workflow ID, Config Store commit ID, backup filename derived from the device’s backup_path, and (when known) deployed intended-config commit ID. The bundled Nautobot provider stores this in the Config Manager plugin, with the filename in the record’s path field.

    The stage returns a changed flag indicating whether the new backup differs from the previous one on record. Each activity has a 1-minute timeout and allows at most 3 total attempts (including the initial attempt).

After all three stages complete, the workflow archives its results and returns the changed flag from the persist stage.

Failure and Retry Behavior

Backups with a SCHEDULED or SYSLOG trigger fail after their activity retries are exhausted instead of waiting for a manual retry signal. API and child workflow invocations retain interactive retry behavior unless the caller sets terminate_on_failure: true. That retry is available within the failed-stage retry window (three hours by default); a child backup’s own run timeout can end it sooner.

Runs started before this change retain their previous wait-for-retry behavior unless terminate_on_failure was explicitly enabled. Upgrading workers does not change that behavior for existing runs.

For an interactive failure, use the workflow lifecycle controls to retry the failed stage after correcting the cause. For an unattended failure, inspect the failed run and start a new backup after correcting it.

Drift detection behavior

Drift is detected by diffing the device’s running configuration against the intended configuration the Render Service most recently produced for that device. Behavior depends on how the workflow was invoked:

  • Direct invocation (API or scheduled). intended_config_commit_id is empty, so the workflow loads the latest intended config from the Config Store, diffs it against the running config, and sets has_drift based on whether the diff is non-empty. When drift is detected, a Slack message links to the workflow run unless the caller sets suppress_drift_notification: true.

  • Child of a Deploy or Multi-Deploy workflow. The parent passes its intended_config_commit_id so the backup knows exactly what it just applied. The check_drift stage skips the diff entirely and records that commit as the deployed configuration. This prevents the post-deploy snapshot from being reported as drift against itself.

  • Child of a Reprovision workflow. No intended_config_commit_id is supplied, so drift detection runs normally. Immediately after ZTP, the device should be on the latest rendered config and the diff is expected to be empty; a non-empty diff here points to a render-vs-device mismatch worth investigating.

  • Rendering disabled. A device with backups enabled and rendering disabled has no intended config to compare against, so the check_drift stage skips the drift check and the backup is persisted without a deployed commit ID. This applies to direct, scheduled and site backups alike. A device with rendering enabled and no intended config still fails the drift check.

If drift detection finds no diff and the call was direct, the workflow updates the recorded deployed commit ID to the current intended config commit so the device history stays in sync with the latest known-good render.

Verifying outcomes

Confirm the backup succeeded by checking the following:

  • Workflow status shows all three stages green on the Config Manager run page. The load stage display contains the running configuration; the drift stage display either reports no drift or includes the diff in a fenced code block; the persist stage display links to the Config Store commit.

  • Config Store commit is present at the device’s backup_path with a commit message of Backup trigger: <TRIGGER> User: <user>. Open the commit in the Config Store to confirm it matches what the device is running.

  • Backup record is available through the DCIM provider. With Nautobot, open the device’s Config Manager Info tab and check the new commit ID and timestamp. The changed flag tells you whether this backup differs from the previous record.

  • No spurious drift alert. Drift posts a Slack message when detected outside of a Deploy run. If the alert fires and you expect the device to be in sync, treat it as a real drift event — see Common issues below.

Common issues

“Missing user for backup attribution” message in the workflow log.

The workflow was invoked without a user. API calls populate this automatically; if you are calling the workflow programmatically, make sure the caller forwards the user (and optional user domain) on the input.

Drift alert fired but the device is supposed to be in sync.

The running config and the rendered intended config differ. The diff in the check_drift stage shows exactly what changed. Common causes:

  • A template or config-context change has been merged and re-rendered, but the device has not been re-deployed yet. Run the Configuration Deploy workflow against the device to bring it back into sync.
  • An operator made a change directly on the device. Either back-port the change into Nautobot/templates, or re-deploy to overwrite it.
  • The Render Service is producing a different config than expected. Open the device’s render in the Config Store and compare it to the device’s running config; see Render Service for how renders are produced.

load_running_configuration fails to reach the device.

The device is unreachable or credentials are wrong. Confirm the management IP is correct in Nautobot, that the device is reachable from the Config Manager cell, and that the secrets store has current credentials for the site. If the device was just reprovisioned, allow ZTP to finish before re-running the backup.

Drift stage fails loading the intended configuration.

For a render-enabled device, confirm that the Render Service has produced an intended configuration in the Config Store. Trigger a render if it is missing, then retry the interactive stage or start a new unattended backup. A backup-enabled device with rendering disabled skips this comparison and does not need an intended configuration.

persist_backup fails to write to the Config Store.

Usually a Config Store auth or path issue. The device’s backup_path is computed from its ID and configuration filename; it is not a field to populate in Nautobot. Check the activity error for the failed write and confirm that the Config Store credentials in the Config Manager cell are current.

  • New Site Bringup — full bringup procedure; a backup is taken at the end of each device’s ZTP via Reprovision.
  • Configuration Deploy — pushes intended config to a device and runs a backup as a child workflow.
  • Multi-Deploy — deploys to many devices in one workflow; each child deploy ends in a backup.
  • Config Store — where backup commits are persisted.
  • Render Service — produces the intended configuration that drift detection compares against.