Postgres recovery from pg_dumpall: relationship does not exist, invalid command \ N

I ran pg_dumpall on a Linux server. And I'm trying to restore the resulting file to another Linux server using the same version of postgres (8.1.21-1.el5_5.1).

When I try to recover, I get the following errors:

# psql --user=postgres -f pgbackup_dcs.sql postgres
[...]
psql:pgbackup_dcs.sql:10753: ERROR:  relation "sl_event" does not exist
psql:pgbackup_dcs.sql:10754: invalid command \N
psql:pgbackup_dcs.sql:10755: invalid command \N
psql:pgbackup_dcs.sql:10756: invalid command \N
psql:pgbackup_dcs.sql:10757: invalid command \N
psql:pgbackup_dcs.sql:10758: invalid command \N
psql:pgbackup_dcs.sql:10759: invalid command \N
[there are a lot of other errors following this point]

These lines in dumpfile look like this (first line here is 10753)

COPY sl_event (ev_origin, ev_seqno, ev_timestamp, ev_minxid, ev_maxxid, ev_xip, ev_type, ev_data1, ev_data2, ev_data3, ev_data4, ev_data5, ev_data6, ev_data7, ev_data8) FROM stdin;
1       687653  2010-12-08 11:54:45.669861      36713740        36713741                SYNC    \N      \N      \N      \N      \N      \N      \N      \N
1       687654  2010-12-08 11:54:55.6757        36713769        36713770                SYNC    \N      \N      \N      \N      \N      \N      \N      \N
1       687655  2010-12-08 11:55:05.68132       36713796        36713797                SYNC    \N      \N      \N      \N      \N      \N      \N      \N

Am I doing something wrong with a dump or recovery? How to restore databases on a new server?

+3
source share
5 answers

postgres, Slony (xxid.sl "slony" ), .

0

CREATE TABLE sl_event (....) ? , , .

+1

pg_dump . , - . db template0, postgres..

0

, ? pg_dumpall -a - . , , , , .

0

/ , .

su - postgres
createdb -T template0 dbname
psql -U username -d dbname -f dumpfile

, pg_dump .dmp 0, ,  http://openacs.org/forums/message-view?message_id=148479

0

Source: https://habr.com/ru/post/1779362/


All Articles