Re: Error by restore a database

From: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>
To: Sbis-Partner <sbis-partner(at)mail(dot)ru>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Error by restore a database
Date: 2013-09-11 13:08:34
Message-ID: CAB7nPqQEFpYDEWuqmBew9=CJRNKrXTVmy7SyssX1XRioXVDL7g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Mon, Sep 9, 2013 at 11:38 PM, Sbis-Partner <sbis-partner(at)mail(dot)ru> wrote:
> Hello!
>
> When you restore a database error occurs
>
> «Pg_restore: creating TABLE dbschema
>
> pg_restore: [archiver (db)] Error from TOC entry 1428; 1259 83487 TABLE
> dbschema User
>
> pg_restore: [archiver (db)] could not execute query: ERROR: role "User" does
> not exist
>
> Command was: ALTER TABLE public.dbschema OWNER TO "User" ».
User and group information are missing in your dump, this information
can be retrieved with pg_dumpall. There are two possibilities in your
case:
- Use the dump you created previously and complete it with data from
pg_dumpall --globals-only containing only user and tablespace
information
- Use a global dump with pg_dumpall with the user information as well
as the database
The latter solution is more instinctive IMO, but the former solution
will work fine as well.
--
Michael

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2013-09-11 13:36:10 Re: BUG #8440: sevices not started automatically
Previous Message Michael Paquier 2013-09-11 13:01:44 Re: Cant start PostgreSQL Using command prompt