Files
blog/.spec/specs/2026-10-24_add-blog-infra/evidence/verify_backup.sh
T
wait4xandGLM-5.3 d8f5ecfbf5 chore(spec): T1/T2 证据落库——备份三件套验证通过,翻译引擎缺口记录
- T1: pg_dump(halo_db) 237K 可恢复 + halo2 目录归档 404M/3577 项,verify_backup.sh 实跑通过
- T2: new-api 网关鉴权/模型端点可用;通用 chat 模型缺渠道(GLM 禁用、
  OpenRouter 仅特殊别名),需用户控制台启用,不阻塞 Phase 0

验证: bash .spec/specs/2026-10-24_add-blog-infra/evidence/verify_backup.sh
      (输出 backup verified: dump readable, tar entries=3577)

Co-authored-by: GLM-5.3
2026-10-24 21:58:07 +08:00

16 lines
637 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/sh
# Phase 0 T1 备份验收:dump 与目录归档三件套存在、非空、结构可读
# 路径约定见 tasks.md T1;pg_restore 宿主缺失时经 postgres 容器兜底
set -e
B="$HOME/backups/blog/halo-20261024"
test -s "$B/halo_db_20261024.dump"
test -s "$B/halo2-dir-20261024.tar.gz"
if command -v pg_restore >/dev/null 2>&1; then
pg_restore --list "$B/halo_db_20261024.dump" >/dev/null
else
docker run --rm -v "$B:/b:ro" postgres:15.4 pg_restore --list /b/halo_db_20261024.dump >/dev/null
fi
N=$(tar tzf "$B/halo2-dir-20261024.tar.gz" | wc -l)
[ "$N" -gt 3000 ]
echo "backup verified: dump readable, tar entries=$N"