Re: Restoring roles information

From: Steve Crawford <scrawford(at)pinpointresearch(dot)com>
To: JORGE MALDONADO <jorgemal1960(at)gmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Restoring roles information
Date: 2012-03-27 23:04:11
Message-ID: 4F72476B.4080609@pinpointresearch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message JORGE MALDONADO 2012-03-28 00:22:47 Re: Restoring roles information
Previous Message JORGE MALDONADO 2012-03-27 22:52:37 Restoring roles information