I'm using ubuntu OS and I took backup using
sudo -u postgres pg_dump dbname | gzip > filename.gz
in the file path as...
/home/administrator/Documents/DB_Backup# sudo -u postgres pg_dump dbname | gzip > filename.gz
Later, I tried to restore it back using these following below...
1. gunzip -c filename.gz | psql glialmine
2. cat filename.gz | gunzip | psql
3. sudo -u postgres psql pg_restore -d dbname filename.gz
all these 3 restore option I used asks password, but I have only one login and I tried it and its not accepting it I also tried root password and linux login password too but its not working.
For first two it asks password like below
Password:
psql: fe_sendauth: no password supplied
and for 3rd one it asks password and its error for my password like below
Password for user pg_restore:
psql: FATAL: password authentication failed for user "pg_restore"
