Re: pg_restore issue

From: Leonardo M(dot) Ramé <l(dot)rame(at)griensu(dot)com>
To: Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>
Cc: PostgreSql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_restore issue
Date: 2014-02-12 18:39:46
Message-ID: 20140212183946.GB6171@leonardo-laptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2014-02-12 09:51:10 -0800, Adrian Klaver wrote:
> On 02/12/2014 09:41 AM, Leonardo M. Ramé wrote:
> >Hi, I'm trying to restore a database dump using pg_restore with the
> >following parameters:
> >
> >pg_restore -h 127.0.0.1 -U _postgresql \
> > -c -d postgres --exit-on-error \
> > my_dump.backup
> >
> >Note I used "\" to wrap the command, but the real one does not have
> >those.
> >
> >pg_restore: [archiver (db)] Error while PROCESSING TOC:
> >pg_restore: [archiver (db)] Error from TOC entry 3156; 2606 432226 FK
> >CONSTRAINT fkidturno postgres
> >pg_restore: [archiver (db)] could not execute query: ERROR: relation
> >"public.turnodocumento" does not exist
> > Command was: ALTER TABLE ONLY public.turnodocumento DROP CONSTRAINT
> >fkidturno;
> >
> >Why is this happening?, should I change the command I'm using to create
> >the backup?.
>
> Did you look in the restored database to see if everything is
> correct or not?
>
>
> What version of pg_dump did you use to do the pg_dump, the 8.4 or 9.2 one?
>
> It is recommended that you use the later version to dump older
> databases as it can deal with any changes that have occurred.
>
> >
> >To backup the database I'm using:
> >
> >pg_dump -Fc -h 127.0.0.1 -U postgres mydb > my_dump.backup
> >
> >P.S.: the original db is PostgreSql 8.4, the target is 9.2
> >
> >Regards,
> >
>

Thanks Adrian, but I cannot use a newer pg_dump version because I cannot
upgrade it inside the remote server, also, as the db is very large I
prefer to do the backup internally and rsync the file.

--
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 (011) 40871877

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Leonardo M. Ramé 2014-02-12 18:41:38 Re: pg_restore issue
Previous Message Tom Lane 2014-02-12 18:30:52 Re: pg_restore issue