On 10/09/2021 06:28, Fábio Santos wrote:
Hello, I can't run the command below on the client that displays the
error below, I believe the problem is in the PGPASSWORD variable, but
I haven't identified the correct way.
Client OS: CentOS Linux release 7.7
Director-IP12-dir JobId 11943: Fatal error: Client "client01-fd"
RunScript failed.
Director-IP12-dir JobId 11943: Fatal error: Bad response to
RunBeforeNow command: wanted 2000 OK RunBeforeNow, got 2905 Bad
RunBeforeNow command.
client01-fd JobId 11943: Error: Runscript: ClientBeforeJob returned
non-zero status=208. ERR=No such file or directory
client01-fd JobId 11943: shell command: run ClientBeforeJob
"PGPASSWORD="postgres2021" pg_dump -h 192.168.10.13 -p 5432 -U
postgres -d postgres -f /tmp/postgres.sql"
Director-IP12-dir JobId 11943: Using Device "FileChgr1-Dev1" to write.
Runscript {
Command = "PGPASSWORD=\"postgres202\" pg_dump -h 192.168.10.13 -p
5432 -U postgres -d postgres -f /tmp/postgres.sql"
RunsWhen = "Before"
}
The command does not get started in a shell.
You need to put it into a shell script, then use something like,
"Command="/bin/sh /path/to/my_script.sh", to run it.
Cheers,
Gary B-)
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users