Re: pg_restore but for full user and roles, etc - Mailing list pgsql-admin

From Wells Oliver
Subject Re: pg_restore but for full user and roles, etc
Date
Msg-id CAOC+FBU0XnS6iTVE-_87+XDgEQdXt5L98+=pE5ocgCc0N8RnCA@mail.gmail.com
Whole thread Raw
In response to Re: pg_restore but for full user and roles, etc  (Wells Oliver <wells.oliver@gmail.com>)
Responses Re: pg_restore but for full user and roles, etc
List pgsql-admin
Ah, sorry for the multiple responses, but it doesn't seem like pg_dumpall is permitted in AWS RDS. If anyone has any other clever ways of getting to this info, would appreciate any ideas.

On Fri, Jul 26, 2024 at 10:15 AM Wells Oliver <wells.oliver@gmail.com> wrote:
Thanks. Yeah, I was basically looking for the role/user only version of pg_dumpall -g, where I'd then handle specific DB restore on its own. Your right thought, I can copy out what I care about from the output.

On Fri, Jul 26, 2024 at 10:06 AM Ron Johnson <ronljohnsonjr@gmail.com> wrote:
On Fri, Jul 26, 2024 at 12:43 PM Wells Oliver <wells.oliver@gmail.com> wrote:
I am doing a pg_restore of a database, which is nothing difficult, but I also am creating a new server first, and rather than painstakingly making sure I create all users and roles etc prior to pg_restore (so we can have the same perms), is there some obvious way of doing this I'm unawares of?

Running "pg_dumpall -g > source_roles.sql" and then scanning it for the relevant entries doesn't seem too onerous.  It's a lot easier than the conceptually similar -- but much trickier -- process you need to go through when migrating SQL Server databases.



--


--

pgsql-admin by date:

Previous
From: Wells Oliver
Date:
Subject: Re: pg_restore but for full user and roles, etc
Next
From: Ron Johnson
Date:
Subject: Re: pg_restore but for full user and roles, etc