Versioning and rolling back policy
A policy snapshot is a named, immutable capture of the entire live policy — rules, rate limits, transformation rules, routing rules, and the global filter settings. Take one before a risky change, restore it if the change goes wrong. This guide covers the operator flows: capture-before-deploy and break-glass restore.
How snapshots work
Snapshots are deliberate and manual — dflux EdgeGuard does not version every write to the control-plane store automatically. You capture a snapshot when you want a save point, and it stays exactly as captured until you restore or delete it. Each snapshot records:
- An autoincrement
id. - A required
nameand an optionaldescription. - A
created_attimestamp. - The
version(the store's config-change counter) at the moment of capture. - The full
configdocument, so a restore can replay the exact state.
Snapshots live on the EdgeControl gRPC admin surface (the same listener d3x-edgectl uses). The RPCs are CreatePolicySnapshot, ListPolicySnapshots, GetPolicySnapshot, DeletePolicySnapshot, and RestorePolicySnapshot. There is no d3x-edgectl subcommand for snapshots today — use the console, or a gRPC client against admin.grpc_listen. Auth is the same API-key / JWT model as every other admin call; see Admin API overview.
Capture a snapshot
Capture the current live policy with CreatePolicySnapshot. name is required; description is optional but worth filling in for break-glass clarity later. The response includes an autoincrement id, the store version at capture time, created_at, and the full captured config document.
List and fetch snapshots
ListPolicySnapshots returns snapshot metadata (newest first) without the full captured config. GetPolicySnapshot fetches one snapshot by id including the full config. DeletePolicySnapshot removes a snapshot you no longer need — deleting never touches the live policy.
Break-glass restore
When a policy change causes a production incident, RestorePolicySnapshot replays a known-good snapshot as the live policy in one call.
Restore is an admin-role operation because it replaces the entire live policy. Listing, fetching, and capturing follow the usual viewer/operator split.
GitOps via per-resource CRUD
Snapshots are a save/restore point, not a deployment mechanism. To drive policy from a repository, keep YAML manifests in Git and apply them with d3x-edgectl apply. Capture a snapshot first so a bad apply has a one-call recovery path:
Per-resource CRUD (policy-rules add / update, and the matching commands for rate limits, transformations, and routing) is still the right tool for a single rule. Use apply when a directory of manifests is the source of truth.
Where to go next
- Admin API: Policy — the snapshot endpoints in full.
- Policy engine — how decisions are made.
- Your first SBI policy.