On 9/15/21 6:53 AM, Sridhar Parepalli wrote:
Hello Pros,
Is there a quick way to create roles from database server to another db server?

pg_dumpall -g the_database -f globals.sql

psql -d other_database -f globals.sql

Though this will include other global objects e.g. tablespaces.

See:

https://www.postgresql.org/docs/current/app-pg-dumpall.html

Regards,
Sridhar Parepalli




--
Adrian Klaver
adrian.kla...@aklaver.com


Reply via email to