Network configuration management
Watchtower backs up the configuration of routers and switches, shows what changed, and can restore an earlier version of NETCONF devices.
Setup
Add the device:
POST /v1/projects/{p}/netconf-deviceswithhost,transport(netconfon port 830, orssh_cliforshow running-config), optionalentity_id(links changes to the entity timeline),interval_s(at least 300, default 900) and eithercredentials(sealed, never returned) orcredentials_ref.Enable the agent module
netconfon a host that can reach the device, withapi_url,api_token,project_idand a localcredentialsmap keyed bycredentials_ref. Credentials used by the agent live only in the agent's file.
What is stored
A new version is stored only when the SHA-256 of the (redacted) config differs from the last.
Values after
password,secret,communityandkey-stringare replaced withREDACTEDbefore anything leaves the agent.The SSH host key is pinned on first use. A changed key is never connected to; the agent logs an error event instead. An operator accepts a new key with
PATCH … {host_key, reset_host_key: true}.Versions are kept for one year. A change inside a maintenance window is still stored.
History, diff and rollback
GET …/configs,GET …/configs/{v},GET …/diff?from=&to=(unified diff).POST …/rollback {version, confirm: true}needsManageMonitorsand is audited asnetconf.rollback. The agent loads the version, replaces the candidate datastore, issues a confirmed commit (120 s), checks the device is reachable through a fresh session, then sends the confirming commit. If the check fails the device reverts by itself.ssh_clidevices are backup only (422rollback_unsupported_for_cli).A stored config with redacted secrets is not rolled back by the agent, since that would overwrite real secrets with the marker text.