Restore
Restoring from a backup creates a new operation record with full audit trail. Previewing a restore is a separate non-mutating planning call.
The service detail Backups tab follows the same rule: a successful backup run must be previewed before the restore action appears in the service workflow. The preview resolves the artifact, target path, verification state, and prior restore count without creating a restore request.
CLI Usage
# Restore from a specific backup
daoflow backup restore --backup-run-id bkp_run_123 --yes
# Preview restore plan through the planning lane
daoflow backup restore --backup-run-id bkp_run_123 --dry-run --json
Restore Process
- Preview — use
--dry-runto fetch thebackupRestorePlanpreview without creating a restore record - Validate — verify the backup run exists, succeeded, and has an artifact path
- Queue — create a restore request record with full audit trail
- Dispatch — start the Temporal restore workflow for the queued restore request
- Fetch — resolve the backup artifact from the configured destination
- Execute — run the restore workflow and record status updates
- Verify — capture completion or failure in restore metadata
- Record — keep the restore request and source backup run immutable
Approval Gates
Approval requests keep the human decision separate while making the approved handoff durable:
# Preview the restore with a read-only token
daoflow backup restore --backup-run-id bkp_run_123 --dry-run --json
# If your operating procedure requires a human gate, create a separate approval request
# through the `requestApproval` API procedure using the dry-run plan as the input template.
# A different owner or admin approves the request. Approval automatically creates
# a durable restore intent; do not issue a second restore command for that request.
daoflow approvals approve --request apr_123 --yes --json
daoflow approvals list --limit 10 --json
The approval queue reports whether the restore intent is pending, retrying, dispatched, succeeded, or in terminal failure. Temporary submission failures reuse the original operation ID so a restart or retry cannot create a duplicate restore. A terminal failure before submission can be retried from the approval dashboard. A restore that was submitted and later failed requires a new approval after the underlying problem is corrected.
Required Scopes
backup:read— to preview a restore plan with--dry-runbackup:restore— to queue a direct restore outside an approval-gated flowapprovals:create— to create an approval-gated restore requestapprovals:decide— to approve, reject, or retry a dispatch that never reached the worker
Safety
--dry-runuses the API planning lane and does not create a restore record- Restoring creates a new operation record (never modifies existing)
- Restore execution requires Temporal mode so requests cannot sit in a fake queue
- The original backup artifact is never modified
- Restore status is recorded even when application-specific rehydration still requires operator follow-through
- All restores appear in the audit trail