6

Hello everyone i am try to create backup in postgres through dump. when i run the command through command line it wants password when i give the password it will give some error

pg_dump: [archiver (db)] connection to database "nsdgpkidb" failed: FATAL:  password authentication failed for user "root" 

if any one have some valuable time please help me thanks.

Kerem
  • 11,377
  • 5
  • 59
  • 58
Vivek Kumar Ray
  • 8,323
  • 5
  • 21
  • 28

1 Answers1

13

Such kind of questions are better to ask on ServerFault. You have to provide pg_dump with the valid postgresql account via command line parameter:

pg_dump -U postgres nsdgpkidb > file.sql

By default it assumes the current local user account (root). Another way is to change the current user and issue the command.

Community
  • 1
  • 1
Artem Koshelev
  • 10,548
  • 4
  • 36
  • 68