Hello,
I am facing an issue regarding the GoCD postgres backup. I am using an external postgres server and I am trying to trigger a backup (using the GoCD API) with a curl command:
curl 'https://<gocd-instance>/go/api/backups' -i -u '<username>:<password>' -H 'X-GoCD-Confirm: true' -H 'Accept: application/vnd.go.cd.v2+json' -X POST
When inspecting the output in the gocd-server I get:
jvm 1 | java.lang.RuntimeException: java.lang.RuntimeException: There was an error backing up the database using `pg_dump`. The `pg_dump` process failed with code 2.
....
jvm 1 | Caused by: java.io.IOException: Cannot run program "pg_dump": error=2, No such file or directory
jvm 1 | at java.base/java.lang.ProcessBuilder.start(Unknown Source)
jvm 1 | at java.base/java.lang.ProcessBuilder.start(Unknown Source)
jvm 1 | at org.zeroturnaround.exec.ProcessExecutor.invokeStart(ProcessExecutor.java:997)
jvm 1 | at org.zeroturnaround.exec.ProcessExecutor.startInternal(ProcessExecutor.java:970)
jvm 1 | at org.zeroturnaround.exec.ProcessExecutor.execute(ProcessExecutor.java:906)
jvm 1 | at com.thoughtworks.go.server.database.pg.PostgresqlBackupProcessor.backup(PostgresqlBackupProcessor.java:43)
jvm 1 | ... 10 common frames omitted
jvm 1 | Caused by: java.io.IOException: error=2, No such file or directory
jvm 1 | at java.base/java.lang.ProcessImpl.forkAndExec(Native Method)
jvm 1 | at java.base/java.lang.ProcessImpl.<init>(Unknown Source)
jvm 1 | at java.base/java.lang.ProcessImpl.start(Unknown Source)
jvm 1 | ... 16 common frames omittedThe server is a k8s pod deployed through a helmchart. The helmchart used is:
https://artifacthub.io/packages/helm/gocd/gocd - version 2.1.0
The gocd image specified in the helmchart is: gocd-server v23.1.0
The postgres server is connected according to the specifications from here:
https://docs.gocd.org/current/installation/configuring_database/connection-properties.htmlMy question is: can I configure somehow the helmchart to recognize the pg_dump command or the postgresql tools in general?
Thanks,
Alex