pg_restore has problems with restoring sequences.

From: robert <robert(at)redcor(dot)ch>
To: pgsql-admin(at)postgresql(dot)org
Subject: pg_restore has problems with restoring sequences.
Date: 2018-02-04 15:10:27
Message-ID: 129cd073-60bf-96db-e129-24bd9a37319e@redcor.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi there,

I want to restore data from a box running V10 in a docker to my local box.

I use

    pg_dump -h localhost  -U USER -Fc DATABASE > dumpfile

then I restore it with:

    dropdb DATABASE

    pg_restore -O  -U user  -d DATABASE  dumpfile

doing this then I get these warnings, and many (not all) sequences are not created.

pg_restore: [archiver (db)] Error from TOC entry 15277; 0 0 SEQUENCE SET
selected_event_zone_id_seq odoo
pg_restore: [archiver (db)] could not execute query: ERROR: relation
"selected_event_zone_id_seq" does not exist
LINE 1: SELECT pg_catalog.setval('selected_event_zone_id_seq', 6, tr...
                                 ^
    Command was: SELECT pg_catalog.setval('selected_event_zone_id_seq', 6, true);

WARNING: errors ignored on restore: 20

how can I fix this.

This procedure never was problematic using postgresql 9.X

thanks

robert

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2018-02-04 15:43:06 Re: pg_restore has problems with restoring sequences.
Previous Message bob gailer 2018-02-03 20:58:06 PG Admin questions