ops: add production observability and recovery

This commit is contained in:
hailin
2026-07-27 19:06:34 +08:00
parent e69368a2f3
commit b02d18d3b9
33 changed files with 8832 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
#!/bin/sh
set -eu
if [ "$#" -ne 1 ]; then
echo "用法:$0 <backup-directory>" >&2
exit 2
fi
TARGET=$(CDPATH= cd -- "$1" && pwd)
for file in SHA256SUMS postgres.dump postgres.contents minio-data.tar.gz manifest.txt; do
if [ ! -f "$TARGET/$file" ]; then
echo "备份缺少文件:$file" >&2
exit 3
fi
done
(
cd "$TARGET"
sha256sum -c SHA256SUMS
)
echo "备份校验通过:$TARGET"