Question

I'm trying to backup my database with:

pg_dump my_database > backup.sql

unfortunately there are no privileges set for many objects in the database,

therefore the command does not work!


Furthermore this does not grant privileges as expected:

GRANT ALL ON DATABASE my_database TO root

Any ideas?

Was it helpful?

Solution

If you need to dump entire database much simpler solution is working as a superuser (postres by default). Isn't it an option?

pg_dump -U postgres my_database > backup.sql

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top