From: | "P(dot) Jourdan" <pippo(at)videotron(dot)ca> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | cannot restore db |
Date: | 2002-04-16 20:19:50 |
Message-ID: | 5.1.0.14.2.20020416155655.00ac91b0@mail.host45.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
I have installed pg 7.2.1_1, initialized & setup databases, installed
plpgsql, set up users & superusers - everything seems to be ok.... but I
cannot restore the backup of a database that was created in pg 7.0.3 .
I do not know how the original was created - pg_dump or pg_dumpall.
These are a few of the first lines of the dump.file:
Username: Password:
\connect - med
CREATE SEQUENCE "category_category_id_seq" start 60 increment 1 maxvalue
2147483647 minvalue 1 cache 1 ;
SELECT nextval ('"category_category_id_seq"');
CREATE SEQUENCE "contact_contact_id_seq" start 576 increment 1 maxvalue
2147483647 minvalue 1 cache 1 ;
SELECT nextval ('"contact_contact_id_seq"');
CREATE SEQUENCE "currency_rates_currency_rate" start 21 increment 1
maxvalue 2147483647 minvalue 1 cache 1 ;
SELECT nextval ('"currency_rates_currency_rate"');
CREATE SEQUENCE "customer_customer_id_seq" start 49 increment 1 maxvalue
2147483647 minvalue 1 cache 1 ;
SELECT nextval ('"customer_customer_id_seq"');
CREATE SEQUENCE "flow_flow_id_seq" start 5 increment 1 maxvalue 2147483647
minvalue 1 cache 1 ;
SELECT nextval ('"flow_flow_id_seq"');
CREATE SEQUENCE "news_news_id_seq" start 1 increment 1 maxvalue 2147483647
minvalue 1 cache 1 ;
SELECT nextval ('"news_news_id_seq"');
CREATE SEQUENCE "order_status_order_status_id" start 7 increment 1 maxvalue
After I run pgsql -d med -f kitchen16022001.psql 2> err
this is the beginning of the err file:
psql:kitchen16022001.psql:4: ERROR: parser: parse error at or near "username"
psql:kitchen16022001.psql:5: ERROR: Relation "category_category_id_seq"
does not exist
psql:kitchen16022001.psql:75: NOTICE: CREATE TABLE / PRIMARY KEY will
create implicit index 'category_pkey' for table 'category'
psql:kitchen16022001.psql:80: NOTICE: CREATE TABLE / PRIMARY KEY will
create implicit index 'country_pkey' for table 'country'
psql:kitchen16022001.psql:86: NOTICE: CREATE TABLE / PRIMARY KEY will
create implicit index 'currency_pkey' for table 'currency'
psql:kitchen16022001.psql:95: NOTICE: CREATE TABLE / PRIMARY KEY will
create implicit index 'currency_rates_pkey' for table 'currency_rates'
psql:kitchen16022001.psql:109: NOTICE: CREATE TABLE / PRIMARY KEY will
create implicit index 'flow_pkey' for table 'flow'
psql:kitchen16022001.psql:116: NOTICE: CREATE TABLE / PRIMARY KEY will
create implicit index 'news_pkey' for table 'news'
...
psql:kitchen16022001.psql:172: NOTICE: CREATE TABLE / PRIMARY KEY will
create implicit index 'trademark_pkey' for table 'trademark'
psql:kitchen16022001.psql:177: ERROR: CREATE TABLE: column
"type_of_alcohol_licence_id" named in key does not exist
psql:kitchen16022001.psql:182: NOTICE: CREATE TABLE / PRIMARY KEY will
create implicit index 'type_of_business_pkey' for table 'type_of_business'
psql:kitchen16022001.psql:187: NOTICE: CREATE TABLE / PRIMARY KEY will
create implicit index 'type_of_business_entity_pkey' for table
'type_of_business_entity'
psql:kitchen16022001.psql:193: NOTICE: CREATE TABLE / PRIMARY KEY will
create .....
...
psql:kitchen16022001.psql:383: NOTICE: CREATE TABLE / PRIMARY KEY will
create implicit index 'newusers_pkey' for table 'newusers'
psql:kitchen16022001.psql:385: ERROR: stat failed on file
'/usr/local/pgsql/lib/plpgsql.so': No such file or directory
psql:kitchen16022001.psql:386: ERROR: Language plpgsql already exists
psql:kitchen16022001.psql:1032: ERROR: Relation "type_of_alcohol_license"
does not exist
psql:kitchen16022001.psql:1038: invalid command \.
psql:kitchen16022001.psql:1039: ERROR: parser: parse error at or near "1"
psql:kitchen16022001.psql:1050: invalid command \.
psql:kitchen16022001.psql:1051: ERROR: parser: parse error at or near "1"
psql:kitchen16022001.psql:1057: invalid command \.
psql:kitchen16022001.psql:1058: ERROR: parser: parse error at or near "1"
psql:kitchen16022001.psql:1066: invalid command \.
psql:kitchen16022001.psql:1067: ERROR: parser: parse error at or near "0"
psql:kitchen16022001.psql:1127: invalid command \.
psql:kitchen16022001.psql:1128: ERROR: parser: parse error at or near "1"
psql:kitchen16022001.psql:2906: invalid command \.
psql:kitchen16022001.psql:2907: ERROR: parser: parse error at or near "1638"
psql:kitchen16022001.psql:2910: invalid command \N
psql:kitchen16022001.psql:2911: invalid command \N
psql:kitchen16022001.psql:2915: invalid command \N ....
Would installing the old version of pg make it possible to restore the
database?
Could the restored database then be migrated to the newer version of pg?
Sorry to be so ignorant, but I am quite new to FreeBSD & Postgrsql.
Can someone help, please?
Philip jourdan
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Post | 2002-04-16 21:58:14 | Pl/Pgsql function troubles: FOLLOW UP |
Previous Message | PG Explorer | 2002-04-16 17:28:06 | Re: pgaccess |