Sample Header Ad - 728x90

can't backup postgres 13 with pg_dump

0 votes
2 answers
1206 views
I'm trying to backup a postgresql 13 database with the following command on MacOS:
`
PGPASSWORD=“my_password” /Library/PostgreSQL/13/bin/pg_dump -h xx.xx.xx.xx -p 5432 -U postgres dbname > my_backup.backup
`` I get the following error:
`
pg_dump: error: connection to database "dbname" failed: could not initiate GSSAPI security context:  The operation or option is not available: Credential for asked mech-type mech not found in the credential handle
FATAL:  password authentication failed for user "postgres"
FATAL:  password authentication failed for user "postgres"
`` I'm looking up this error on google but I didn't found the solution yet. I'm providing the correct password, because I can connect to the host with this username/password-combination through pgadmin 4. It's a Google Cloud Platform SQL Instance. Anyone who knows the solution?
Asked by Sam Leurs (141 rep)
Sep 19, 2021, 06:58 PM
Last activity: Jan 10, 2025, 07:00 PM