How to run Pg_dump/pg_dumpall command on Linux?

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.

Answers


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.


Need Your Help

Viewing Unpushed Git Commits

git git-diff git-log

How can I view any local commits I've made, that haven't yet been pushed to the remote repository? Occasionally, git status will print out that my branch is X commits ahead of origin/master, but not

Density plot for x,y array of points

python arrays numpy density-plot

I'm trying to generate a density plot for a list of x,y points, each one of them associated to a given density value. See this image to see what I'm after.