pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to restore roles into new Database server?
7+ messages / 4 participants
[nested] [flat]
* How to restore roles into new Database server?
@ 2021-09-15 13:53 Sridhar Parepalli <Sridhar.Parepalli@sas.com>
0 siblings, 3 replies; 7+ messages in thread
From: Sridhar Parepalli @ 2021-09-15 13:53 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Hello Pros,
Is there a quick way to create roles from database server to another db server?
Regards,
Sridhar Parepalli
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: How to restore roles into new Database server?
@ 2021-09-15 14:10 Ninad Shah <nshah.postgres@gmail.com>
parent: Sridhar Parepalli <Sridhar.Parepalli@sas.com>
2 siblings, 1 reply; 7+ messages in thread
From: Ninad Shah @ 2021-09-15 14:10 UTC (permalink / raw)
To: Sridhar Parepalli <Sridhar.Parepalli@sas.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
This can be accomplished by taking a global dump. pg_dumpall utility has an
option "-g" to accomplish that.
Regards,
Ninad Shah
On Wed, 15 Sept 2021 at 19:24, Sridhar Parepalli <Sridhar.Parepalli@sas.com>
wrote:
> Hello Pros,
> Is there a quick way to create roles from database server to another db
> server?
> Regards,
> Sridhar Parepalli
>
>
>
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: How to restore roles into new Database server?
@ 2021-09-15 14:12 Adrian Klaver <adrian.klaver@aklaver.com>
parent: Sridhar Parepalli <Sridhar.Parepalli@sas.com>
2 siblings, 1 reply; 7+ messages in thread
From: Adrian Klaver @ 2021-09-15 14:12 UTC (permalink / raw)
To: Sridhar Parepalli <Sridhar.Parepalli@sas.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
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
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: How to restore roles into new Database server?
@ 2021-09-15 14:55 Thomas Kellerer <shammat@gmx.net>
parent: Sridhar Parepalli <Sridhar.Parepalli@sas.com>
2 siblings, 1 reply; 7+ messages in thread
From: Thomas Kellerer @ 2021-09-15 14:55 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
Sridhar Parepalli schrieb am 15.09.2021 um 15:53:
> Hello Pros,
> Is there a quick way to create roles from database server to another db server?
You can use pg_dumpall with the --globals-only parameter to create a SQL script
that contains all roles from the source server
^ permalink raw reply [nested|flat] 7+ messages in thread
* RE: How to restore roles into new Database server?
@ 2021-09-15 17:18 Sridhar Parepalli <Sridhar.Parepalli@sas.com>
parent: Ninad Shah <nshah.postgres@gmail.com>
0 siblings, 0 replies; 7+ messages in thread
From: Sridhar Parepalli @ 2021-09-15 17:18 UTC (permalink / raw)
To: Ninad Shah <nshah.postgres@gmail.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Thank you! Ninad
From: Ninad Shah <nshah.postgres@gmail.com>
Sent: Wednesday, September 15, 2021 10:11 AM
To: Sridhar Parepalli <Sridhar.Parepalli@sas.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: How to restore roles into new Database server?
EXTERNAL
This can be accomplished by taking a global dump. pg_dumpall utility has an option "-g" to accomplish that.
Regards,
Ninad Shah
On Wed, 15 Sept 2021 at 19:24, Sridhar Parepalli <Sridhar.Parepalli@sas.com<mailto:Sridhar.Parepalli@sas.com>> wrote:
Hello Pros,
Is there a quick way to create roles from database server to another db server?
Regards,
Sridhar Parepalli
^ permalink raw reply [nested|flat] 7+ messages in thread
* RE: How to restore roles into new Database server?
@ 2021-09-15 17:18 Sridhar Parepalli <Sridhar.Parepalli@sas.com>
parent: Adrian Klaver <adrian.klaver@aklaver.com>
0 siblings, 0 replies; 7+ messages in thread
From: Sridhar Parepalli @ 2021-09-15 17:18 UTC (permalink / raw)
To: Adrian Klaver <adrian.klaver@aklaver.com>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Thank you, Adrian!
-----Original Message-----
From: Adrian Klaver <adrian.klaver@aklaver.com>
Sent: Wednesday, September 15, 2021 10:13 AM
To: Sridhar Parepalli <Sridhar.Parepalli@sas.com>; pgsql-general@lists.postgresql.org
Subject: Re: How to restore roles into new Database server?
EXTERNAL
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://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.postgresql.org%2Fdocs%2Fcurren...
> Regards,
> Sridhar Parepalli
>
>
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 7+ messages in thread
* RE: How to restore roles into new Database server?
@ 2021-09-15 17:19 Sridhar Parepalli <Sridhar.Parepalli@sas.com>
parent: Thomas Kellerer <shammat@gmx.net>
0 siblings, 0 replies; 7+ messages in thread
From: Sridhar Parepalli @ 2021-09-15 17:19 UTC (permalink / raw)
To: Thomas Kellerer <shammat@gmx.net>; pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Thank you, Thomas!
-----Original Message-----
From: Thomas Kellerer <shammat@gmx.net>
Sent: Wednesday, September 15, 2021 10:55 AM
To: pgsql-general@lists.postgresql.org
Subject: Re: How to restore roles into new Database server?
EXTERNAL
Sridhar Parepalli schrieb am 15.09.2021 um 15:53:
> Hello Pros,
> Is there a quick way to create roles from database server to another db server?
You can use pg_dumpall with the --globals-only parameter to create a SQL script that contains all roles from the source server
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2021-09-15 17:19 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-09-15 13:53 How to restore roles into new Database server? Sridhar Parepalli <Sridhar.Parepalli@sas.com>
2021-09-15 14:10 ` Ninad Shah <nshah.postgres@gmail.com>
2021-09-15 17:18 ` Sridhar Parepalli <Sridhar.Parepalli@sas.com>
2021-09-15 14:12 ` Adrian Klaver <adrian.klaver@aklaver.com>
2021-09-15 17:18 ` Sridhar Parepalli <Sridhar.Parepalli@sas.com>
2021-09-15 14:55 ` Thomas Kellerer <shammat@gmx.net>
2021-09-15 17:19 ` Sridhar Parepalli <Sridhar.Parepalli@sas.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox