fix(backup): verify host188 recovery end to end
Some checks failed
CD Pipeline / select-latest-carrier (push) Successful in 49s
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 2m28s
CD Pipeline / revalidate-deploy-carrier (push) Successful in 27s
CD Pipeline / build-and-deploy (push) Failing after 17m18s
CD Pipeline / revalidate-post-deploy-carrier (push) Has been skipped
CD Pipeline / post-deploy-checks (push) Has been skipped
E2E Health Check / e2e-health (push) Successful in 48s
AI 技術雷達監控 / ai-technology-watch (push) Successful in 1m4s
AWOOOI Harbor 110 Local Repair / workflow-shape (push) Successful in 0s
AWOOOI Harbor 110 Local Repair / harbor-110-local-repair (push) Successful in 22s

This commit is contained in:
Your Name
2026-07-18 19:11:59 +08:00
parent 420738514e
commit e614f061f7
18 changed files with 1211 additions and 54 deletions

View File

@@ -65,6 +65,7 @@ bash -n \
scripts/backup/backup-ai-artifacts.sh \
scripts/backup/backup-public-routes.sh \
scripts/backup/backup-host188-products.sh \
scripts/backup/verify-host188-products-backup.sh \
scripts/backup/configure-offsite-rclone.sh \
scripts/backup/configure-offsite-b2.sh \
scripts/backup/sync-offsite-backups.sh \
@@ -86,6 +87,7 @@ python3 -m py_compile \
scripts/ops/backup-alert-live-visibility-check.py \
scripts/ops/recovery-scorecard-contract-check.py \
scripts/backup/clickhouse-restore-inventory.py \
scripts/backup/verify-host188-products-archive.py \
scripts/ops/doc-secrets-sanity-check.py
echo "Python 語法 OK"
@@ -107,6 +109,7 @@ echo "== Ansible syntax-check =="
for playbook in \
infra/ansible/playbooks/site.yml \
infra/ansible/playbooks/110-devops.yml \
infra/ansible/playbooks/110-backup-runtime-deploy.yml \
infra/ansible/playbooks/188-ai-web.yml \
infra/ansible/playbooks/nginx-sync.yml; do
ansible-playbook -i infra/ansible/inventory/hosts.yml "$playbook" --syntax-check

View File

@@ -1193,6 +1193,9 @@ def _collect_110(host: str) -> list[str]:
"backup-ai-artifacts.sh",
"backup-public-routes.sh",
"backup-host188-products.sh",
"verify-host188-products-backup.sh",
"verify-host188-products-archive.py",
"enforce-latest-only-retention.sh",
"configure-offsite-rclone.sh",
"configure-offsite-b2.sh",
"sync-offsite-backups.sh",
@@ -1231,7 +1234,7 @@ def _collect_110(host: str) -> list[str]:
("clawbot", "/backup/clawbot", 48),
("ai_artifacts", "/backup/ai-artifacts", 48),
("public_routes", "/backup/public-routes", 168),
("host188_products", "/backup/host188-products", 48),
("host188_products", "/backup/host188-products", 30),
]:
timestamp, count = _latest_restic_snapshot(repo)
age = int(time.time()) - timestamp if timestamp else 0