Problem Backing Up a DB

From: "Peter Neu" <peter(dot)neu(at)gmx(dot)net>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Problem Backing Up a DB
Date: 2007-04-24 12:33:18
Message-ID: 02e401c7866c$bd2e5a30$bcc8a8c0@PCMELZER
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I have a problem with backing up a database. The original db runs on a SuSE
ES 9 box in Unicode. Version 7.4.2

The recovery db is supposed to run on a windows xp box. The encoding is
UTF-8. Version 8.1

On the linux box I did:
pg_dumpall > outfile

On the windows box I did:

psql -f outfile authdb

Problem is when I reload the db in this manner the sequences for the id
column gets messed up ("user_auth_id2_seq"). The count starts from 1 again
when I insert a new row. :o(

For error output please see below. I already created the empty db authdb on
the recovery instance because otherwise an error is thrown.

Cheers,
Pete

C:\Programme\PostgreSQL\8.1\bin>psql -f C:/pgsqldump_20-04-07.sql authdb
Password:
You are now connected to database "template1".
psql:C:/pgsqldump_20-04-07.sql:11: ERROR: cannot delete from a view
HINT: You need an unconditional ON DELETE DO INSTEAD rule.
psql:C:/pgsqldump_20-04-07.sql:13: NOTICE: SYSID can no longer be specified
psql:C:/pgsqldump_20-04-07.sql:13: ERROR: role "admin" already exists
psql:C:/pgsqldump_20-04-07.sql:14: NOTICE: SYSID can no longer be specified
psql:C:/pgsqldump_20-04-07.sql:14: ERROR: role "foo" already exists
psql:C:/pgsqldump_20-04-07.sql:15: NOTICE: SYSID can no longer be specified
psql:C:/pgsqldump_20-04-07.sql:15: ERROR: role "www" already exists
psql:C:/pgsqldump_20-04-07.sql:22: ERROR: cannot delete from a view
HINT: You need an unconditional ON DELETE DO INSTEAD rule.
psql:C:/pgsqldump_20-04-07.sql:24: NOTICE: SYSID can no longer be specified
psql:C:/pgsqldump_20-04-07.sql:24: ERROR: role "www" already exists
psql:C:/pgsqldump_20-04-07.sql:25: ERROR: role "www" is a member of role
"www"
psql:C:/pgsqldump_20-04-07.sql:32: ERROR: database "authdb" already exists
You are now connected to database "authdb".
SET
SET
SET
REVOKE
GRANT
SET
SET
psql:C:/pgsqldump_20-04-07.sql:83: NOTICE: CREATE TABLE will create
implicit sequence "user_aut
umn "user_auth.id"
CREATE TABLE
REVOKE
GRANT
CREATE TABLE
CREATE TABLE
REVOKE
GRANT
SET
psql:C:/pgsqldump_20-04-07.sql:157: NOTICE: CREATE TABLE will create
implicit sequence "login_i
"login.id"
CREATE TABLE
SET
psql:C:/pgsqldump_20-04-07.sql:173: NOTICE: CREATE TABLE will create
implicit sequence "antwort
lumn "antworten.id"
CREATE TABLE
psql:C:/pgsqldump_20-04-07.sql:188: NOTICE: CREATE TABLE will create
implicit sequence "beitrae
lumn "beitraege.id"
CREATE TABLE
SET
psql:C:/pgsqldump_20-04-07.sql:203: NOTICE: CREATE TABLE will create
implicit sequence "user_lo
umn "user_log.id"
CREATE TABLE
REVOKE
SET
SET
SET
SET
SET
psql:C:/pgsqldump_20-04-07.sql:5010: NOTICE: ALTER TABLE / ADD PRIMARY KEY
will create implicit
table "user_auth"
ALTER TABLE
psql:C:/pgsqldump_20-04-07.sql:5019: NOTICE: ALTER TABLE / ADD PRIMARY KEY
will create implicit
le "contentlist_summary"
ALTER TABLE
psql:C:/pgsqldump_20-04-07.sql:5028: NOTICE: ALTER TABLE / ADD PRIMARY KEY
will create implicit
table "user_data"
ALTER TABLE
SET
psql:C:/pgsqldump_20-04-07.sql:5039: NOTICE: ALTER TABLE / ADD PRIMARY KEY
will create implicit
ble "login"
ALTER TABLE
SET
psql:C:/pgsqldump_20-04-07.sql:5050: NOTICE: ALTER TABLE / ADD PRIMARY KEY
will create implicit
for table "antworten"
ALTER TABLE
psql:C:/pgsqldump_20-04-07.sql:5059: NOTICE: ALTER TABLE / ADD PRIMARY KEY
will create implicit
for table "beitraege"
ALTER TABLE
SET
psql:C:/pgsqldump_20-04-07.sql:5070: NOTICE: ALTER TABLE / ADD PRIMARY KEY
will create implicit
or table "user_log"
ALTER TABLE
SET
psql:C:/pgsqldump_20-04-07.sql:5080: ERROR: relation "user_auth_id2_seq"
does not exist
setval
--------
58
(1 row)

setval
--------
1
(1 row)

setval
--------
1
(1 row)

SET
setval
--------
28
(1 row)

SET
COMMENT
You are now connected to database "template1".
SET
SET
SET
REVOKE
GRANT
SET
COMMENT
SET
COMMENT

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Wilkinson, Jim 2007-04-24 12:45:13 Re: hi
Previous Message Penchalaiah P. 2007-04-24 12:09:05 hi