Hello,
Decided to go ahead and do the upgrade today, using postgresql as the
database and running 2.0.9.
Now, as I'm a good boy I of course took a full pg_dump from the database
and started then process. Compiled new binaries and so.
Now I ran the migrate2.0to2.2 script against the database and well, not
everything goes well. I might have cancelled the migration script
thinking about a better way to do it but can't really remember now.
So then I proceed to take another dump, this time not full, I excluded
the schema (pg_dump -a). Now what went really wrong was that I actually
overwrote the original full dump... gahhhhhh... (didn't realize it yet
at this point)
So in the long run nothing seemed to start working and I was thinking to
go back to the 2.0.9 and try another time. I drop the database, and go
for the restore.
Hmm, doesn't have a schema... how's that...
I check the sql dump and I see some very worrying fields, like "SELECT
pg_catalog.setval('dbmail_sievescripts_idnr_seq', 1, false);". At this
point I realized that my 'backup' dump is tad bit newer than I hoped for.
So ok, I try different types of getting the sql file (3.3G) pushed back
into the DB since I still hope I can use the 2.0.9 daemons against it. I
hope I'm right here?
I've tried to insert the dump back again 2.0.9 schema and 2.2.1 schema.
I always end up with some errors like
-- with 2.0.9 schema --
$ psql -U dbmail -d dbmail -f dbmail.sql
Password:
SET
SET
SET
SET
setval
--------
20
(1 row)
psql:dbmail.sql:22: ERROR: relation "dbmail_ccfield_idnr_seq" does not
exist
psql:dbmail.sql:29: ERROR: relation "dbmail_datefield_idnr_seq" does
not exist
psql:dbmail.sql:36: ERROR: relation "dbmail_envelope_idnr_seq" does not
exist
psql:dbmail.sql:43: ERROR: relation "dbmail_fromfield_idnr_seq" does
not exist
psql:dbmail.sql:50: ERROR: relation "dbmail_headername_idnr_seq" does
not exist
psql:dbmail.sql:57: ERROR: relation "dbmail_headervalue_idnr_seq" does
not exist
setval
--------
286
(1 row)
setval
--------
114512
(1 row)
setval
--------
122353
(1 row)
setval
--------
57936
(1 row)
psql:dbmail.sql:92: ERROR: relation "dbmail_referencesfield_idnr_seq"
does not exist
psql:dbmail.sql:99: ERROR: relation "dbmail_replytofield_idnr_seq" does
not exist
setval
--------
951
(1 row)
psql:dbmail.sql:113: ERROR: relation "dbmail_sievescripts_idnr_seq"
does not exist
psql:dbmail.sql:120: ERROR: relation "dbmail_subjectfield_idnr_seq"
does not exist
psql:dbmail.sql:127: ERROR: relation "dbmail_tofield_idnr_seq" does not
exist
setval
--------
18
(1 row)
psql:dbmail.sql:141: ERROR: relation "dbma_mta" does not exist
psql:dbmail.sql:144: invalid command \.
psql:dbmail.sql:151: ERROR: syntax error at or near "ncm" at character 1
psql:dbmail.sql:151: LINE 1: ncm.brain.riken.jp dspam-smtp:
psql:dbmail.sql:151: ^
psql:dbmail.sql:152: invalid command \.
psql:dbmail.sql:191: ERROR: column "start_date" of relation
"dbmail_auto_replies" does not exist
psql:dbmail.sql:192: invalid command \.
psql:dbmail.sql:199: ERROR: relation "dbmail_envelope" does not exist
psql:dbmail.sql:200: invalid command \.
psql:dbmail.sql:207: ERROR: insert or update on table
"dbmail_mailboxes" violates foreign key constraint
"dbmail_mailboxes_owner_idnr_fkey"
DETAIL: Key (owner_idnr)=(3) is not present in table "dbmail_users".
-- end of 2.0.9 schema --
and then I end up with the physmessages filled up correctly but no users
nor any mailboxes or messageblks.
-- with 2.2.1 schema --
psql:dbmail.sql:141: ERROR: relation "dbma_mta" does not exist
psql:dbmail.sql:144: invalid command \.
psql:dbmail.sql:151: ERROR: syntax error at or near "ncm" at character 1
psql:dbmail.sql:151: LINE 1: ncm.brain.riken.jp dspam-smtp:
psql:dbmail.sql:151: ^
psql:dbmail.sql:152: invalid command \.
psql:dbmail.sql:207: ERROR: insert or update on table
"dbmail_mailboxes" violates foreign key constraint
"dbmail_mailboxes_owner_idnr_fkey"
DETAIL: Key (owner_idnr)=(3) is not present in table "dbmail_users".
ll
psql:dbmail.sql:456: ERROR: insert or update on table
"dbmail_messageblks" violates foreign key constraint
"dbmail_messageblks_physmessage_id_fkey"
DETAIL: Key (physmessage_id)=(4515) is not present in table
"dbmail_physmessage".
psql:dbmail.sql:77664: ERROR: insert or update on table
"dbmail_messages" violates foreign key constraint
"dbmail_messages_mailbox_idnr_fkey"
DETAIL: Key (mailbox_idnr)=(150) is not present in table
"dbmail_mailboxes".
psql:dbmail.sql:140877: ERROR: insert or update on table
"dbmail_subscription" violates foreign key constraint
"dbmail_subscription_user_id_fkey"
DETAIL: Key (user_id)=(3) is not present in table "dbmail_users".
psql:dbmail.sql:141124: ERROR: duplicate key violates unique constraint
"dbmail_users_pkey"
CONTEXT: COPY dbmail_users, line 1: "1 [EMAIL PROTECTED]@__
0 0 0
md5 1979-11-03 22:05:58"
-- end of 2.2.1 schema --
I'm worried about those key constraints, why do they not work with the
SQL dump? I've once restored from the full (schema+sql) dump and it
worked just fine.
So any help would be greatly appreciated. I have a couple of days time
to get this back up...
--
br,
Tommi
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail