Re: How to restore roles into new Database server? - Mailing list pgsql-general

From Adrian Klaver
Subject Re: How to restore roles into new Database server?
Date
Msg-id 315ff3e5-dbab-fc10-7278-a7c6b13bbc5e@aklaver.com
Whole thread Raw
In response to How to restore roles into new Database server?  (Sridhar Parepalli <Sridhar.Parepalli@sas.com>)
Responses RE: How to restore roles into new Database server?  (Sridhar Parepalli <Sridhar.Parepalli@sas.com>)
List pgsql-general
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.klaver@aklaver.com



pgsql-general by date:

Previous
From: Ninad Shah
Date:
Subject: Re: How to restore roles into new Database server?
Next
From: Adrian Klaver
Date:
Subject: Re: Basic Questions about PostgreSQL.