vote up 0 vote down star

How to create a backup of an POSTGRES DB using bash?

flag

2 Answers

vote up 4 vote down check
pg_dump -U some_user_name -f dump.file -Fc database_name

That's all.

If you need to authenticate with password - use pgpass file.

link|flag
vote up 0 vote down

Use pg_dump.

link|flag
I have difficulties including the username and password with pg_dump – Roland Oct 14 at 18:51

Your Answer

Get an OpenID
or
never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.