diff --git a/src/pg_probackup.c b/src/pg_probackup.c index 339c282f..3946f0c9 100644 --- a/src/pg_probackup.c +++ b/src/pg_probackup.c @@ -298,6 +298,7 @@ main(int argc, char *argv[]) else if (strcmp(argv[1], "agent") == 0 && argc > 2) { remote_agent = argv[2]; + sleep(10); if (strcmp(remote_agent, PROGRAM_VERSION) != 0) { uint32 agent_version = parse_program_version(remote_agent); diff --git a/src/utils/remote.c b/src/utils/remote.c index 139d4e4a..ab27bf71 100644 --- a/src/utils/remote.c +++ b/src/utils/remote.c @@ -137,9 +137,12 @@ bool launch_agent(void) probackup = sep + 1; } } -#endif + snprintf(cmd, sizeof(cmd), "%s\\%s agent %s", + instance_config.remote.path, probackup, PROGRAM_VERSION); +#else snprintf(cmd, sizeof(cmd), "%s/%s agent %s", instance_config.remote.path, probackup, PROGRAM_VERSION); +#endif } else { snprintf(cmd, sizeof(cmd), "%s agent %s", pg_probackup, PROGRAM_VERSION); }