How to create a backup of an POSTGRES DB using bash?
3 Answers
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.
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.