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>
75 lines
2.0 KiB
Bash
Executable File
75 lines
2.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# === METADATA ===
|
|
SCRIPT_NAME="$(basename "$0")"
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
SKILL_ROOT="$(dirname "$SCRIPT_DIR")"
|
|
|
|
# === CONFIGURATION ===
|
|
: "${OUTPUT_DIR:=$SKILL_ROOT/outputs}"
|
|
|
|
# === FUNCTIONS ===
|
|
log_info() { echo "[INFO] $(date -Iseconds) $*"; }
|
|
log_warn() { echo "[WARN] $(date -Iseconds) $*" >&2; }
|
|
log_error() { echo "[ERROR] $(date -Iseconds) $*" >&2; }
|
|
die() { log_error "$@"; exit 1; }
|
|
|
|
check_file() {
|
|
local path="$1"
|
|
local name="$2"
|
|
if [[ -f "$path" ]]; then
|
|
local size
|
|
size=$(stat -c%s "$path")
|
|
log_info "[OK] $name ($size bytes)"
|
|
return 0
|
|
else
|
|
log_warn "[MISSING] $name"
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
main() {
|
|
local last_run_file="$OUTPUT_DIR/last_run_dir.txt"
|
|
[[ -f "$last_run_file" ]] || die "No last run pointer. Run 11_backup_apply.sh first."
|
|
|
|
local run_dir
|
|
run_dir="$(cat "$last_run_file")"
|
|
|
|
log_info "Verifying backup artifacts..."
|
|
log_info "Run directory: $run_dir"
|
|
echo ""
|
|
|
|
local missing=0
|
|
|
|
log_info "=== Core Artifacts ==="
|
|
check_file "$run_dir/archive.tar.gz" "archive.tar.gz" || ((missing++))
|
|
check_file "$run_dir/archive.tar.gz.age" "archive.tar.gz.age" || ((missing++))
|
|
check_file "$run_dir/manifest.json" "manifest.json" || ((missing++))
|
|
echo ""
|
|
|
|
log_info "=== Proof Artifacts ==="
|
|
check_file "$run_dir/ROOT.txt" "ROOT.txt" || ((missing++))
|
|
check_file "$run_dir/PROOF.json" "PROOF.json" || ((missing++))
|
|
echo ""
|
|
|
|
log_info "=== Metadata ==="
|
|
check_file "$run_dir/excludes.txt" "excludes.txt" || true
|
|
echo ""
|
|
|
|
if [[ $missing -gt 0 ]]; then
|
|
die "Verification failed: $missing missing artifacts."
|
|
fi
|
|
|
|
log_info "=== ROOT Value ==="
|
|
local root
|
|
root=$(cat "$run_dir/ROOT.txt")
|
|
log_info "ROOT: $root"
|
|
echo ""
|
|
|
|
log_info "Verification complete. All artifacts present."
|
|
log_info "Next: ./scripts/50_restore_drill.sh (MANDATORY)"
|
|
}
|
|
|
|
[[ "${BASH_SOURCE[0]}" == "$0" ]] && main "$@"
|