修复异机备份凭证与中断恢复(07-27-offhost-backup-final-fixes)
ci-e2e / e2e (push) Waiting to run
ci-minimal / check-minimal (push) Waiting to run

这个提交包含在:
2026-07-27 17:58:11 +08:00
父节点 f1e8cf138a
当前提交 01f1259557
共修改 13 个文件,包含 748 行新增和 16 行删除
+9 -6
查看文件
@@ -341,12 +341,15 @@ print(f"{unquote(value.username)}\t{database_name}")
[[ "$source_image_digest" =~ ^sha256:[0-9a-f]{64}$ ]] || fail "active server image digest is invalid"
CURRENT_PHASE="paired_backup"
if ! capture_command paired_backup env \
DATABASE_URL="$database_url" DB_TOOL_MODE=docker DB_CONTAINER="$DB_CONTAINER" \
POSTGRES_DB="$postgres_db" POSTGRES_USER="$postgres_user" POSTGRES_PASSWORD="$postgres_password" \
STORAGE_DIR_HOST="$STORAGE_HOST_DIR" BACKUP_DIR="$AUTOMATIC_BACKUP_DIR" \
BACKUP_RUN_ID="$run_id" BUILD_SHA="$BUILD_SHA" SOURCE_IMAGE_DIGEST="$source_image_digest" \
"$ROOT_DIR/scripts/backup-all.sh"; then
if ! (
export DATABASE_URL="$database_url"
export DB_TOOL_MODE=docker DB_CONTAINER
export POSTGRES_DB="$postgres_db" POSTGRES_USER="$postgres_user"
export POSTGRES_PASSWORD="$postgres_password"
export STORAGE_DIR_HOST="$STORAGE_HOST_DIR" BACKUP_DIR="$AUTOMATIC_BACKUP_DIR"
export BACKUP_RUN_ID="$run_id" BUILD_SHA SOURCE_IMAGE_DIGEST="$source_image_digest"
capture_command paired_backup "$ROOT_DIR/scripts/backup-all.sh"
); then
fail "paired backup command failed"
fi
[[ -d "$batch_dir" && -f "$batch_dir/manifest.json" ]] || fail "complete local batch was not published"