Initial commit: VaultMesh Skills collection
Collection of operational skills for VaultMesh infrastructure including: - backup-sovereign: Backup and recovery operations - btc-anchor: Bitcoin anchoring - cloudflare-tunnel-manager: Cloudflare tunnel management - container-registry: Container registry operations - disaster-recovery: Disaster recovery procedures - dns-sovereign: DNS management - eth-anchor: Ethereum anchoring - gitea-bootstrap: Gitea setup and configuration - hetzner-bootstrap: Hetzner server provisioning - merkle-forest: Merkle tree operations - node-hardening: Node security hardening - operator-bootstrap: Operator initialization - proof-verifier: Cryptographic proof verification - rfc3161-anchor: RFC3161 timestamping - secrets-vault: Secrets management 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
60
disaster-recovery/scripts/90_verify.sh
Normal file
60
disaster-recovery/scripts/90_verify.sh
Normal file
@@ -0,0 +1,60 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
SKILL_ROOT="$(dirname "$SCRIPT_DIR")"
|
||||
source "$SCRIPT_DIR/_common.sh"
|
||||
|
||||
: "${BACKUP_SKILL_DIR:=}"
|
||||
: "${RUN_DIR:=}"
|
||||
|
||||
main() {
|
||||
local status="$SKILL_ROOT/outputs/status_matrix.json"
|
||||
local ok_validate=false ok_restore=false ok_verify=false
|
||||
|
||||
if [[ -n "$BACKUP_SKILL_DIR" ]]; then
|
||||
local run_dir; run_dir="$(resolve_run_dir "$BACKUP_SKILL_DIR" "$RUN_DIR")"
|
||||
if [[ -f "$run_dir/ROOT.txt" && -f "$run_dir/manifest.json" && -f "$run_dir/archive.tar.gz.age" ]]; then
|
||||
ok_validate=true
|
||||
fi
|
||||
fi
|
||||
|
||||
local ptr="$SKILL_ROOT/outputs/last_drill_target.txt"
|
||||
if [[ -f "$ptr" ]]; then
|
||||
ok_restore=true
|
||||
local target; target="$(cat "$ptr")"
|
||||
if [[ -f "$target/restored_manifest_check.json" ]]; then
|
||||
ok_verify=true
|
||||
fi
|
||||
fi
|
||||
|
||||
blockers="[]"
|
||||
if [[ "$ok_restore" != "true" ]]; then
|
||||
blockers='["restore_not_performed"]'
|
||||
elif [[ "$ok_verify" != "true" ]]; then
|
||||
blockers='["post_restore_verification_missing"]'
|
||||
fi
|
||||
|
||||
cat > "$status" <<EOF
|
||||
{
|
||||
"skill": "disaster-recovery",
|
||||
"timestamp": "$(date -Iseconds)",
|
||||
"checks": [
|
||||
{"name":"run_validation_possible", "ok": $ok_validate},
|
||||
{"name":"staged_restore_performed", "ok": $ok_restore},
|
||||
{"name":"post_restore_verification", "ok": $ok_verify}
|
||||
],
|
||||
"blockers": $blockers,
|
||||
"warnings": [],
|
||||
"next_steps": [
|
||||
"Repeat drills weekly for the current node baseline",
|
||||
"Perform a drill on a second machine (recommended)",
|
||||
"Write a production restore procedure for a specific service"
|
||||
]
|
||||
}
|
||||
EOF
|
||||
|
||||
log_info "Wrote $status"
|
||||
cat "$status"
|
||||
}
|
||||
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user