I ran pg_dumpall on a Linux server And I'm attempting to restore the resulting file on another linux server, running the same version of postgres (8.1.21-1.el5_5.1).
When I try to restore 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 the 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 either the dump or the restore? How can I restore the DBs on the new server?
Is there a CREATE TABLE sl_event(....) in the backup? You try to copy content into a table that doesn't exist, it must be missing in the backup or it's created after the copy statement.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With