It looks like the file version is 12.0.12.22220.  I'm using the version 
that shipped with the PostgreSQL 12 installer. I can downgrade to a lower 
PostgreSQL version if this is an issue with this release of pg_dump.

The message I get when constructing the command line using as-is from the 
logs is:

"C:\Users\removed>pg_dump --no-password --host=localhost --port=5432 
--username=removed gocd --file="C:\Program Files (x86)\Go 
Server\artifacts\serverBackups\backup_20221101-202201\db.gocd"
pg_dump: error: too many command-line arguments (first is 
"--file=C:\Program Files (x86)\Go 
Server\artifacts\serverBackups\backup_20221101-202201\db.gocd")
Try "pg_dump --help" for more information."

I can make it work by adding the --dbname= in front of the gocd value 
although the directory has to be created before the path from the logs will 
work. I'm assuming thats because the process failed in GoCD so the folder 
was removed as cleanup. Creating the folder results in a successful db.gocd 
backup file being created.

Thanks!

On Wednesday, November 2, 2022 at 8:58:17 AM UTC-5 ketanpad...@gmail.com 
wrote:

> What version of pg_dump are you using? According to 
> https://www.postgresql.org/docs/current/app-pgdump.html, the command line 
> string looks OK. But we've not tested this on windows.
>
> - Ketan
>
>
>
> On Wed, Nov 2, 2022 at 4:31 AM Funkycybermonk <chan...@gmail.com> wrote:
>
>> Hello!
>>
>> New upgrade going from GoCD 20.1 to 22.2 and migrated to PostgreSQL v12 
>> on Windows. Everything is now working properly but the backups were blowing 
>> up due to not being able to find pg_dump. I added the bin for PostgreSQL to 
>> the system path and the backup exits with a status code 1. I went back and 
>> checked the command and it looks like it might be blowing up because the 
>> dbname isn't defined with a parameter name. 
>>
>> The executing bit is showing [pg_dump, --no-password, --host=localhost, 
>> --port=5432, --username=<removed>, gocd, --file=C:\Program Files (x86)\Go 
>> Server\artifacts\serverBackups\backup_20221101-215455\db.gocd] with 
>> environment {PGPASSWORD=<removed>}
>>
>> The gocd bit in the middle appears to be the dbname but its not qualified 
>> as --dbname. Is that a bug or is there something I haven't configured 
>> properly? If I take that parameter string and run it in a command prompt 
>> with the commas removed it blows up on the parameters not matching up. 
>> Adding the --dbname= to that parameter works for me but I'm not sure if 
>> that should be required. 
>>
>> I can roll back to H2 but I was hoping there would be a performance 
>> improvement and future-proofing if I went ahead with the migration now. If 
>> that doesn't make sense then I'm happy to stay with H2.
>>
>> Thanks!
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "go-cd" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to go-cd+un...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/go-cd/1a7de3d6-8dae-4da0-b675-6d02ab885993n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/go-cd/1a7de3d6-8dae-4da0-b675-6d02ab885993n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to go-cd+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/go-cd/991c4de4-b112-4fc9-a8ed-4a8e3a2bdd3an%40googlegroups.com.

Reply via email to