I have been using postgreSQL, trying to dump plain backup file using command:
psql -U postgres DATABASE < path to file.backup
But getting peer authentication failure. Even tried changing pg_hba.conf from peer to md5, but didn't work.
I have been using postgreSQL, trying to dump plain backup file using command:
psql -U postgres DATABASE < path to file.backup
But getting peer authentication failure. Even tried changing pg_hba.conf from peer to md5, but didn't work.
peer means you are not OS user postgres, while trying to connect as one,
sudo su - postgrespsql DBNAME >file.sqlhttps://www.postgresql.org/docs/current/static/auth-methods.html#AUTH-PEER
The peer authentication method works by obtaining the client's operating system user name from the kernel and using it as the allowed database user name (with optional user name mapping). This method is only supported on local connections.