Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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"

migration rejected from May 8 '15 at 15:33

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by dezso, Mark Sinkinson, Max Vernon, RolandoMySQLDBA, Colin 't Hart May 8 '15 at 15:33

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – dezso, Mark Sinkinson, Max Vernon, RolandoMySQLDBA, Colin 't Hart
If this question can be reworded to fit the rules in the help center, please edit the question.