fix(dbbackup): 缺 MinecraftServer 导出时重试、CLI 失败退出、面板与 watchdog 告警,异地快照要求完整
This commit is contained in:
21 files changed
+605
-38
No files matched your search
+3
-1
@@ -4074,7 +4074,9 @@ migrate_host_postgres() {
|
||||
remember_temp "$fresh"
|
||||
write_felis_toml "$legacy" "127.0.0.1:5432"
|
||||
write_felis_toml "$fresh" "127.0.0.1:${PG_HOST_PORT}" "${CONTROL_NS}/${PG_DEPLOYMENT}"
|
||||
out="$("$HOST_BIN" db backup -config "$legacy" -dir "$FELIS_DB_BACKUP_DIR" -label pre-pg-move -keep 0)" \
|
||||
# The move carries the database alone; the MinecraftServer objects stay in the
|
||||
# cluster, so a cluster slow to answer their export must not stop it.
|
||||
out="$("$HOST_BIN" db backup -config "$legacy" -dir "$FELIS_DB_BACKUP_DIR" -label pre-pg-move -keep 0 -no-servers)" \
|
||||
|| die "could not take a bundle of the host database; nothing was moved"
|
||||
bundle="$(printf '%s\n' "$out" | sed -n 's/^felis db backup: wrote //p' | tail -n 1)"
|
||||
[ -n "$bundle" ] && [ -f "$bundle" ] || die "felis db backup reported no bundle; nothing was moved"
|
||||
|
||||
@@ -3534,7 +3534,7 @@ run_move() { # holds(0/1) backup(ok|silent|fail) restore-exit compare-exit
|
||||
out="$(run_move 1 ok)"
|
||||
calls="$(cat "$mgdir/calls")"
|
||||
expect "the bundle is taken from the host server, never pruned" \
|
||||
"FELIS db backup [127.0.0.1:5432 no-deployment] -dir $mgdir/db -label pre-pg-move -keep 0" "$calls"
|
||||
"FELIS db backup [127.0.0.1:5432 no-deployment] -dir $mgdir/db -label pre-pg-move -keep 0 -no-servers" "$calls"
|
||||
expect "the bundle is restored into the pod, which served nobody yet" \
|
||||
"FELIS db restore [127.0.0.1:15432 felis/felis-postgres] -dir $mgdir/db -yes -no-safety-backup $mgdir/db/b.tar" "$calls"
|
||||
before "writers are stopped before the bundle" "QUIESCE" "FELIS db backup" "$calls"
|
||||
|
||||
Reference in new issue
Block a user