Re: Restoring roles information - Mailing list pgsql-novice

From Steve Crawford
Subject Re: Restoring roles information
Date
Msg-id 4F72476B.4080609@pinpointresearch.com
Whole thread Raw
In response to Restoring roles information  (JORGE MALDONADO <jorgemal1960@gmail.com>)
List pgsql-novice
On 03/27/2012 03:52 PM, JORGE MALDONADO wrote:
> I am upgrading from PostgreSQL v9.0 to v9.1 and I have a plain format
> backup. I reviewed the backup file and I see that it contains
> everything except the creation of "login roles" and "group roles".
>
> Is there a way to include the creation of roles in a backup or do I
> have to create them manually before performing the restore operation?
>
> Respectfully,
> Jorge Maldonado

How did you create the backup? The pg_dump program does not dump the
"globals", i.e. the roles, tablespaces, ...

The pg_dumpall program does dump globals but also dumps all databases
which may not be what you want.

You can use pg_dumpall with the -g (globals) option which will create a
dump having the only the commands needed to recreate the global entries.

Also, just as a check, did you create the dump file using the 9.1 dump
programs. If not, you should redo them. The recommended upgrade
procedure is to use the dump programs from the new version of PostgreSQL.

Cheers,
Steve


pgsql-novice by date:

Previous
From: JORGE MALDONADO
Date:
Subject: Restoring roles information
Next
From: JORGE MALDONADO
Date:
Subject: Re: Restoring roles information