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?