From e2ac5bfbd7697f7279501bba425f0db8ab93fbad Mon Sep 17 00:00:00 2001 From: Rostislav Dugin Date: Fri, 20 Mar 2026 17:29:56 +0300 Subject: [PATCH] FIX (agent): Make pgType param mandatory over restore --- agent/cmd/main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/agent/cmd/main.go b/agent/cmd/main.go index d79b6eb..9367da2 100644 --- a/agent/cmd/main.go +++ b/agent/cmd/main.go @@ -144,6 +144,11 @@ func runRestore(args []string) { os.Exit(1) } + if cfg.PgType != "host" && cfg.PgType != "docker" { + fmt.Fprintf(os.Stderr, "Error: --pg-type must be 'host' or 'docker', got '%s'\n", cfg.PgType) + os.Exit(1) + } + apiClient := api.NewClient(cfg.DatabasusHost, cfg.Token, log) restorer := restore.NewRestorer(apiClient, log, *pgDataDir, *backupID, *targetTime, cfg.PgType)