Backup of users and groups?

Поиск
Список
Период
Сортировка
Искать

Backup of users and groups?

От:
Bjørn T Johansen <btj@havleik.no>
Дата:
Is it enough to just copy pg_group and pg_pwd to backup users and groups 
and to copy those files back to restore?
Will this also work from 7.3.x to 7.4.x?


Regards,

BTJ

Re: Backup of users and groups?

От:
Dave Cramer <pg@fastcrypt.com>
Дата:
Bjorn,

You should do a pg_dump all of your database(s) if you want to restore
them on to a 7.4 instance.

At a minimum, do a pg_dump -s db for the schema, I believe it will dump
the users and groups.

Dave
On Wed, 2004-03-10 at 07:59, Bjørn T Johansen wrote:
> Is it enough to just copy pg_group and pg_pwd to backup users and groups 
> and to copy those files back to restore?
> Will this also work from 7.3.x to 7.4.x?
> 
> 
> Regards,
> 
> BTJ
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 9: the planner will ignore your desire to choose an index scan if your
>       joining column's datatypes do not match
> 
-- 
Dave Cramer
519 939 0336
ICQ # 14675561

Re: Backup of users and groups?

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Dave Cramer  writes:
> You should do a pg_dump all of your database(s) if you want to restore
> them on to a 7.4 instance.

> At a minimum, do a pg_dump -s db for the schema, I believe it will dump
> the users and groups.

No, pg_dump only dumps what is in a single database.  Users and groups
span all databases in a cluster, so they are outside the purview of
pg_dump.  You *must* use pg_dumpall to dump user and group info.

There is an option to pg_dumpall to dump only this info, and not invoke
pg_dump on each individual database as it normally would do.

			regards, tom lane

Re: Backup of users and groups?

От:
Kris Jurka <books@ejurka.com>
Дата:


On Wed, 10 Mar 2004, Dave Cramer wrote:

> Bjorn,
> 
> You should do a pg_dump all of your database(s) if you want to restore
> them on to a 7.4 instance.
> 
> At a minimum, do a pg_dump -s db for the schema, I believe it will dump
> the users and groups.

pg_dump only operates on one database, to dump cluster global entities 
like users and groups pg_dumpall should be used.

Also this is not a JDBC question and is more appropriate for the -general 
list.

Kris Jurka

Re: Backup of users and groups?

От:
Dave Cramer <pg@fastcrypt.com>
Дата:
My first line should have  been pg_dumpall, at any rate, the command tom
is referring to is

pg_dumpall --globals_only


make sure you do this before you upgrade.

Dave
On Wed, 2004-03-10 at 11:21, Tom Lane wrote:
> Dave Cramer  writes:
> > You should do a pg_dump all of your database(s) if you want to restore
> > them on to a 7.4 instance.
> 
> > At a minimum, do a pg_dump -s db for the schema, I believe it will dump
> > the users and groups.
> 
> No, pg_dump only dumps what is in a single database.  Users and groups
> span all databases in a cluster, so they are outside the purview of
> pg_dump.  You *must* use pg_dumpall to dump user and group info.
> 
> There is an option to pg_dumpall to dump only this info, and not invoke
> pg_dump on each individual database as it normally would do.
> 
> 			regards, tom lane
> 
-- 
Dave Cramer
519 939 0336
ICQ # 14675561

FAQ