- Decentralization Manager
- Operations and reference
- Backup, recovery, and upgrades
Backup, recovery, and upgrades
Purpose
Section titled “Purpose”Use this runbook to back up and restore one Decentralization Manager node. Use it also to upgrade every node in a peer mesh.
This runbook covers the data directory of the node and its configuration. It does not recover a lost Canton signing key, a Decentralized Party key, or an identity-provider tenant. Use the Canton, membership, or identity recovery procedure for those failures.
Before you begin
Section titled “Before you begin”Confirm that you have:
- Administrative access to the node’s runtime environment and its persistent volume.
- A backup destination with encryption, access control, retention, and deletion policies.
- The tag and the digest of the deployed image.
- The
DECPM_DB_ENCRYPTION_KEYvalue from your secret store, if the node uses one. - A record of the Noise public key of this node, kept outside the node.
- A list of peers, Decentralized Parties, expected packages, and active workflow runs.
- A maintenance window that every peer operator agreed to, when the procedure affects the mesh.
What to back up
Section titled “What to back up”The node writes its state to the data/ directory under its root directory. The --dir (-d) flag or DECPM_DIR sets the root directory.
| Start command or image | Root directory | Data directory |
|---|---|---|
dec-party-manager -d /app serve, as in the deployment guide manifest | /app | /app/data |
Root image …:<tag> without -d | / | /data |
Nonroot image …:<tag>-nonroot without -d | /home/nonroot | /home/nonroot/data |
Binary without --dir and without DECPM_DIR | The current directory | ./data |
The root directory has this layout:
<root directory>/├── .env # optional; see the .env item below for where the node reads it└── data/ ├── noise.key # Noise private key, hex-encoded, mode 0600 ├── decpm.db # SQLite database ├── decpm.db-wal # SQLite write-ahead log, when present └── decpm.db-shm # SQLite shared-memory file, when presentBack up the complete data directory. Do not select single files.
noise.keyis the Noise identity of the node. Peers store the matching public key and use it to authenticate this node.decpm.dbis the SQLite database. The database runs in write-ahead-log mode, so the-walfile can hold recent writes.
The database holds these records:
- Peer records and party credentials.
- The cached membership of each Decentralized Party.
- The governance audit trail.
- Pending and handled invitations.
- Workflow runs, and the artifacts that a resume or a retry needs.
- ACS import quarantine records.
Two more items can belong to the backup:
DECPM_DB_PATH, or the--dbflag, moves the database. Back up that file and its-waland-shmfiles.- A
.envfile can hold secrets. The node reads it from the--dir(-d) directory, or from the working directory without that flag.DECPM_DIRdoes not change this location. Back it up under the controls of your secret store.
Record these items with each backup:
- The image tag and digest, and the
build_versionthatGET /node-configreturns. - The node configuration, without secret values in the ordinary copy. The Configuration reference lists every variable.
- The Canton network, synchronizer, Admin API, and Ledger API settings, including the TLS certificate files.
- The identity-provider type and the client IDs.
- Whether database encryption is on.
- The AWS credentials setup, if the node signs with AWS KMS. See Sign with AWS KMS.
- The backup time, operator, storage location, checksum, and retention date.
- The workflow state and the reason for the maintenance.
Create a cold backup
Section titled “Create a cold backup”Take a cold backup. A copy of a running SQLite database in write-ahead-log mode can be inconsistent. The container image has no shell and no sqlite3 tool, so you cannot make an online backup with it.
Notify the peer operators. Start no new workflow runs.
Finish or cancel every in-flight run. At startup, the node resumes every run that the database records as
inprogress.Record the image tag, the Noise public key, the peer status, the package state, and the workflow state.
Stop the node.
Terminal window kubectl -n <namespace> scale deploy/dec-party-manager --replicas=0kubectl -n <namespace> get podsConfirm that no process writes to the persistent volume.
Create an encrypted volume snapshot, or an archive of the complete data directory. The image has no shell, so copy the files from a helper pod that mounts the volume.
Create a checksum for the backup artifact.
Terminal window sha256sum <backup-artifact>Verify that the artifact contains
noise.keyanddecpm.db.Start the same release again.
Terminal window kubectl -n <namespace> scale deploy/dec-party-manager --replicas=1kubectl -n <namespace> rollout status deploy/dec-party-managerVerify authentication, Canton connectivity, the Noise identity, peers, packages, and the workflow state.
Expected result: the node starts with the same Noise public key and the same local state.
Restore a node
Section titled “Restore a node”Restore into an isolated environment first. Do not open the Noise port to peers until the identity and state checks pass.
Declare the incident and record the reason for the restore.
Make sure that the failed node and the replacement never run at the same time with the same identity.
Select the newest valid backup from before the failure.
Verify the backup checksum and the access record.
Provision one replacement node with the same data path and the image tag from the backup record.
Restore the complete data directory, including
noise.key,decpm.db, and any-waland-shmfiles.Change the file owner to uid 65532 if the replacement runs the
-nonrootimage and the files come from the root image. See Move a node to the nonroot image.Restore the node configuration. Supply the original
DECPM_DB_ENCRYPTION_KEYbefore startup, if the node used database encryption.Start the replacement without peer access.
Read the startup logs. The node runs SQL migrations at startup. Stop if a migration fails.
Compare the
Noise public key: <hex>log line with your record.GET /keys/statusreturns the same key inpublic_key.Test the stored party credentials. The node requests a fresh token for each party and reports
successfor each one. SetDECMAN_URLandDECMAN_TOKENas in API and workflow reference.Terminal window curl --fail-with-body -X POST \-H "Authorization: Bearer ${DECMAN_TOKEN}" \"${DECMAN_URL}/auth/test"Verify the identity-provider login.
GET /node-healthreports whether the Admin API and the Ledger API answer.Compare the peers, party credentials, packages, and workflow state with the recovery record.
Open the Noise port. Ask the peer operators to verify connectivity in both directions.
Run read-only checks, such as peer status and contract queries.
Run one low-risk governance action only after the read-only checks pass.
Record the recovery evidence. Close or hand off the incident.
Stop and escalate if one of these conditions is true:
- The Noise public key changed.
- The credential test fails with the original encryption key.
- A migration fails.
- Peer records are missing.
- Package IDs differ.
- The workflow state is unclear.
- The failed node can still start.
Recover from common failure scenarios
Section titled “Recover from common failure scenarios”| Scenario | Response |
|---|---|
| The pod or container failed, and the volume is intact | Start the same image against the existing volume. Verify the Noise key and the local state before you resume workflows. |
| The volume is lost, and a valid backup exists | Restore the data directory and the matching release in isolation. Follow the full restore procedure. |
noise.key is lost or changed | Do not let the node run with a new key unnoticed. If you cannot restore the original key, every peer must authenticate and approve the new public key. |
decpm.db is lost, and noise.key is intact | The node keeps its peer identity. It loses the peer records, the party credentials, and the workflow state. Restore the database. Without a backup, enter the peers and the party credentials again. |
| The database encryption key is lost | Do not set a new key against the existing database. Recover the original key from your secret store, or escalate to your security team. |
| A failure happens during an active run | Read the run state and the ledger state before you retry, cancel, or start another run. A failed coordinator does not prove that the governed action did not advance. |
| A run that adds a member failed | Retry the run on the coordinator. Do not cancel it. Do not reconnect the participant of the new member by hand. See Add a member to a Decentralized Party. |
| Canton or Decentralized Party signing material is lost | This backup does not hold that material. Use the membership and Canton key-recovery procedure. |
Move a node to the nonroot image
Section titled “Move a node to the nonroot image”Each release from v1.7.0 has two images. Both images hold the same binary and take the same configuration.
| Tag | Runs as | DECPM_DIR default |
|---|---|---|
public.ecr.aws/dlc-link/decentralization-manager:<tag> | uid 0 (root) | / |
public.ecr.aws/dlc-link/decentralization-manager:<tag>-nonroot | uid 65532 | /home/nonroot |
A volume that the root image wrote holds root-owned files. fsGroup alone does not fix this problem. fsGroup changes the group owner and adds group write permission. The user owner stays root.
The node sets mode 0600 on data/noise.key at every start. Uid 65532 cannot change the mode of a file that it does not own. With fsGroup, the node logs Failed to chmod key file '<path>'. Without fsGroup, it logs Failed to read key file '<path>'. The node does not stop after either error. It runs without the Noise listener, so it cannot exchange messages with its peers.
Change the owner of the volume once. Add a temporary root init container before the existing init containers:
initContainers: - name: chown-data image: busybox:latest command: ["sh", "-c", "chown -R 65532:65532 /app"] securityContext: runAsUser: 0 runAsNonRoot: false volumeMounts: - name: data mountPath: /appRemove this init container after one start without a key file error. From then on, the node owns every file that it writes.
- A namespace under the
restrictedPod Security Standard rejects this container. Run the samechown -Rfrom a one-off root pod that mounts the volume. - A
docker runwith a bind mount needs the same change of owner on the host directory.
Check the data path before you switch images. The deployment guide manifest passes -d /app, so its data path stays the same. A node that uses the image default keeps its data in /data on the root image. The nonroot image expects it in /home/nonroot/data. Move the files, or set DECPM_DIR.
Upgrade a peer mesh
Section titled “Upgrade a peer mesh”All nodes of a Decentralized Party must run the same release. The code itself accepts any peer that has the same wire version and reports version 0.1.9 or later.
Treat version compatibility as a property of the whole mesh. Each Noise frame starts with a wire-version byte. A node rejects every frame whose byte differs from its own.
Wire-format boundaries
Section titled “Wire-format boundaries”A change of the wire version forces a lockstep upgrade. Nodes on different wire versions cannot exchange any peer message. The log on each side shows Noise protocol version mismatch.
| Change | Wire version | First release | What changes |
|---|---|---|---|
| Concurrent workflows | No version byte → 0xD1 | v1.4.0 | Every frame gets the version byte and a run-routing field. Migrations 000013 to 000015 apply. |
| ACS block streaming | 0xD1 → 0xD2 | v1.8.0 | The ACS transfer of an add-member run moves to block streaming. Migrations 000016 to 000018 apply. |
| Deployment intents and legacy-key retirement | 0xD2 → 0xD3 | Releases after v1.13.0 | Contracts invitations carry deployment-intent commitments. The membership workflows retire legacy keys. Migrations 000020, 000022, and 000023 apply. |
Releases before v1.4.0, such as v1.0.0, have no version byte.
A coordinator also checks the version of each invitee before a run starts. It sends a health probe and expects version 0.1.9 or later in the reply. Otherwise it refuses the start with HTTP 409 and names the blocking peers. A node on another wire version cannot answer the probe, so a mixed mesh cannot start a run.
A release that keeps the wire version can run next to the previous release. You can then upgrade one node at a time. Release notes from v1.8.0 state whether the release changes WIRE_VERSION. See Compatibility, releases, and troubleshooting.
Plan the change
Section titled “Plan the change”- Read the release notes. Find wire-version changes, new migrations, package changes, and rollback limits.
- Record the current release of each peer.
GET /participants-statusreturnsversionandbuild_versionfor each peer. - Plan a lockstep window if the release changes
WIRE_VERSION. Plan a rolling upgrade only when the release notes say that the wire version is unchanged. - Finish or cancel every run on every node.
- Create and verify a cold backup of every node.
- Define the go and no-go checks, the rollback authority, the communications, and the maximum window.
Lockstep upgrade
Section titled “Lockstep upgrade”Use this procedure when a release changes the wire version.
- Confirm that every peer operator is ready. Confirm that no run is in flight on any node.
- Stop every Decentralization Manager node in the mesh.
- Set the new image tag on every node.
- Start the nodes. Each node applies the new migrations at startup.
- Read the startup log and the migration result of each node.
- Verify the Noise public key on every node.
- Verify peer connectivity across the full mesh.
- Verify authentication, Canton connections, party credentials, and package IDs.
- Run read-only contract and status queries.
- Run one low-risk governance action.
- Resume normal workflows and record the result.
Upgrade to wire version 0xD3
Section titled “Upgrade to wire version 0xD3”Releases after v1.13.0 use wire version 0xD3. This version adds deployment-intent verification and legacy-key retirement. Older peers cannot accept the new invitations or the new signing commands. The version byte also rejects retries of runs that started before the upgrade.
- Finish or cancel every active run on every node.
- Stop every node in the mesh.
- Upgrade the whole mesh to the same build.
- Start the mesh again.
- Start a new Contracts run for each deployment whose invitation a peer accepted before the upgrade. Those invitations carry no deployment-intent commitments.
After this upgrade, three workflows end with a RetireLegacyKeys step: add-member (AddParty), kick (Kick), and change-threshold (ChangeThreshold).
- The step starts after the inline signing keys in
PartyToParticipanttake effect. - The namespace owners then authorize the removal of the old
PartyToKeyMappingunder the current namespace threshold. - The run completes only after Canton shows the removal.
- A party without a legacy mapping skips the step.
Upgrade the participating nodes before you run these workflows. If RetireLegacyKeys times out, bring enough upgraded namespace owners online. Then click Retry on the run card of the coordinator. The run resumes at the cleanup step and does not repeat the topology change. The inline keys stay authoritative while the cleanup is pending.
Rolling upgrade
Section titled “Rolling upgrade”Use a rolling upgrade only when the release notes state that WIRE_VERSION is unchanged.
- Back up the node.
- Finish or cancel the runs that this node coordinates or takes part in.
- Update the image tag of the node. Wait for the rollout.
- Verify the startup log, the Noise public key, and peer connectivity.
- Repeat the steps for the next node.
Some features need the new release on several nodes. The release notes name those features.
Roll back an upgrade
Section titled “Roll back an upgrade”A rollback is a restore, not an image downgrade.
- Each release note names the migrations that the release adds. After they apply, a downgrade on the same volume is not supported.
- An older binary refuses to start on a database that a newer release migrated. Its log shows
migration <n> was previously applied but is missing in the resolved migrations. - The node runs forward migrations only. Do not reverse migrations by hand.
To roll back:
- Stop workflows and isolate the affected mesh.
- Compare the failure with the rollback conditions that you defined.
- Check whether the upgrade crossed a wire-format boundary. If it did, roll back every node in the mesh.
- Stop every affected node.
- Restore the pre-upgrade backup and the pre-upgrade image together.
- Run the restore checks and the mesh checks again before you resume work.
Test cadence
Section titled “Test cadence”A production recovery program includes:
- A checksum and a restore verification for every backup.
- A scheduled restore test in isolation.
- A mesh-upgrade rehearsal before each release that changes the wire version or adds migrations.
- A peer-key replacement exercise.
- A disaster exercise for volume loss, lost credentials, and failure during an active run.
- Evidence for each backup, restore, and upgrade test.
Technical sources
Section titled “Technical sources”- Deployment guide
- Adding a member to a Decentralized Party
- Data directory names
- Data paths
- Command-line flags
- Startup sequence
- Noise wire version and key file
- Noise listener startup
- SQLite connection and migrations
- Encryption of stored secrets
- Container image
- Release notes
Related pages
Section titled “Related pages”- Production deployment
- Authentication and operator roles
- Membership and governance changes
- Add a member to a Decentralized Party
- Security architecture
- Compatibility, releases, and troubleshooting
Next step
Section titled “Next step”Check the release facts before an upgrade: Compatibility, releases, and troubleshooting.
Ask the docs
Answers come only from this documentation and can be wrong. Check the linked pages.
Ask a question about BitSafe, CBTC or the developer guides. For example: