| From: | Tommy Gildseth <tommy(dot)gildseth(at)usit(dot)uio(dot)no> |
|---|---|
| To: | Chris Curvey <ccurvey(at)gmail(dot)com> |
| Cc: | pgsql-admin(at)postgresql(dot)org |
| Subject: | Re: moving users/roles from one server to another? |
| Date: | 2008-12-10 11:35:23 |
| Message-ID: | 493FA97B.90201@usit.uio.no |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
Chris Curvey wrote:
> I'm a newbie to PG administration (although I have experience with
> other DBs). I need to move a single database to a brand new server.
>
> I've set up the new server with initdb, set up pg_hba.conf and
> postgresql.conf, and I can use dump and restore to move the database
> to the new environment.
>
> What I can't figure out is how to move all the existing users and
> roles over. I know about pg_dumpall, but that seems to be overkill --
> I don't need to move *all* the databases on my original server, just
> one of them.
>
> Is there a way to copy over just the users (with their passwords) and
> the roles?
>
>
pg_dumpall -g
If need be, you can edit the resulting SQL to only move over the bits
you need.
--
Tommy Gildseth
DBA, Gruppe for databasedrift
Universitetet i Oslo, USIT
m: +47 45 86 38 50
t: +47 22 85 29 39
| From | Date | Subject | |
|---|---|---|---|
| Next Message | zz_11 | 2008-12-10 12:23:35 | warm standby server |
| Previous Message | Suresh Borse | 2008-12-10 10:40:11 | Re: Heavy postgres process |