PDA

View Full Version : Problem restoring database



zach666
08-31-2010, 03:54 AM
I updated my system from XP to Win7 and can't get my old database working. I made backup with pgAdminIII and now when I try to restore it, first it crashed few times and finally it got through with some errors. But the hands still not showing in HEM, I have selected the database from HEM.
I downloaded the HEM package, so the postgre is newer than my old, but i read it doesn't matter.

netsrak
08-31-2010, 04:29 AM
If your old postgresql installation was to old (older than 8.3) it is not possible to import the backup with 8.4.

Do you have your old hands from the archive folder? I think the best is to create a new database and reimport the hands.

zach666
08-31-2010, 06:42 AM
The old one was 8.3 and now the restore doesn't crash anymore. It gives 2 errors:

pg_restore: creating PROCEDURAL LANGUAGE plpgsql
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 425; 2612 16386 PROCEDURAL LANGUAGE plpgsql postgres
pg_restore: [archiver (db)] could not execute query: ERROR: language "plpgsql" already exists
Command was:
CREATE PROCEDURAL LANGUAGE plpgsql;

pg_restore: restoring data for table "players"
pg_restore: [archiver (db)] Error from TOC entry 2048; 0 16493 TABLE DATA players postgres
pg_restore: [archiver (db)] COPY failed: ERROR: null value in column "player_id" violates not-null constraint
CONTEXT: COPY players, line 5279: "\N \N \N \N \N \N \N"

It seems it copies all other information, but gives error with "players" table and in HEM I cant choose a player because there 0 of them.

Any idea with this information how to fix this?
And I dont have any other data that this backup file. I changed to a new site about 3 months ago so its not a disaster if I loose those hands and there's not really a use to older ones.

netsrak
08-31-2010, 09:03 AM
This seems like the backup file is corrupt or wrong in some way. I see no way to fix this.