Page 1 of 1
How to move a Observed HH database?

Posted:
Sun Nov 16, 2008 11:28 am
by langejan
I have a databse in PT3 with observed hands only. I have not stored the HH tetxt for them.
I want to move this databse to my laptop. How can I do that? I cant export them when I have'nt stored the HH text.
Re: How to move a Observed HH database?

Posted:
Sun Nov 16, 2008 3:56 pm
by WhiteRider
You will need to backup and restore the database to your laptop.
See the
Database / Postgres FAQ.
Re: How to move a Observed HH database?

Posted:
Sun Nov 16, 2008 6:41 pm
by langejan
Ok. I backed up the database succesfully.
But when I try to restore it on my laptop I get a lot of errors. Here is the first lines of the error messages:
C:\Program Files\PostgreSQL\8.3\bin\pg_restore.exe -h localhost -p 5432 -U postgres -d "PT3_2008_11_16_231622" -v "C:\Users\Claus-laptop\Desktop\New Folder\ipoker_obs.backup"
pg_restore: connecting to database for restore
pg_restore: creating SCHEMA public
pg_restore: creating COMMENT SCHEMA public
pg_restore: creating TABLE holdem_cache
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 1564; 1259 84436 TABLE holdem_cache postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "holdem_cache" already exists
Command was:
CREATE TABLE holdem_cache (
id_player integer NOT NULL,
id_limit integer NOT NULL,
cnt_players integer NOT NULL...
pg_restore: creating TABLE holdem_hand_histories
pg_restore: [archiver (db)] Error from TOC entry 1536; 1259 26256 TABLE holdem_hand_histories postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "holdem_hand_histories" already exists
Command was: CREATE TABLE holdem_hand_histories (
id_hand integer NOT NULL,
history text
);
pg_restore: creating TABLE holdem_hand_player_combinations
pg_restore: [archiver (db)] Error from TOC entry 1553; 1259 84343 TABLE holdem_hand_player_combinations postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "holdem_hand_player_combinations" already exists
Command was: CREATE TABLE holdem_hand_player_combinations (
id_hand integer NOT NULL,
id_player integer NOT NULL,
flg_f_highc...
pg_restore: creating TABLE holdem_hand_player_detail
pg_restore: [archiver (db)] Error from TOC entry 1554; 1259 84350 TABLE holdem_hand_player_detail postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "holdem_hand_player_detail" already exists
Command was: CREATE TABLE holdem_hand_player_detail (
id_hand integer NOT NULL,
id_player integer NOT NULL,
seat smallint,
...
pg_restore: creating TABLE holdem_hand_player_statistics
pg_restore: [archiver (db)] Error from TOC entry 1555; 1259 84357 TABLE holdem_hand_player_statistics postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "holdem_hand_player_statistics" already exists
Command was: CREATE TABLE holdem_hand_player_statistics (
id_hand integer NOT NULL,
id_player integer NOT NULL,
id_player_rea...
pg_restore: creating TABLE holdem_hand_summary
pg_restore: [archiver (db)] Error from TOC entry 1556; 1259 84368 TABLE holdem_hand_summary postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "holdem_hand_summary" already exists
Command was: CREATE TABLE holdem_hand_summary (
id_hand integer NOT NULL,
id_site smallint,
id_limit smallint,
id_table i...
pg_restore: creating TABLE holdem_limit
pg_restore: [archiver (db)] Error from TOC entry 1537; 1259 26264 TABLE holdem_limit postgres
pg_restore: [archiver (db)] could not execute query: ERROR: relation "holdem_limit" already exists
Command was: CREATE TABLE holdem_limit (
id_limit smallint NOT NULL,
Re: How to move a Observed HH database?

Posted:
Mon Nov 17, 2008 5:15 am
by WhiteRider
I'm not a postgres expert, but that looks like you're trying to restore into a database that already exists with the same name.
Try changing the DB name.
Re: How to move a Observed HH database?

Posted:
Mon Nov 17, 2008 11:37 am
by Jouni85
http://www.pokertracker.com/forums/viewtopic.php?f=45&t=4098&p=56993#p56991"To restore you will need to use PT3 to create a new database, then use the above method but choose "Restore..." to restore the backup into the new database."
WhiteRider wrote:I'm not a postgres expert, but that looks like you're trying to restore into a database that already exists with the same name.
Try changing the DB name.
So first you have to create a database with pt3 and then restore to different named database?? I got the same errors + missing header in the mybackedupdatabase.tar. Please don't tell my compressed file is corrupted or something.
Re: How to move a Observed HH database?

Posted:
Mon Nov 17, 2008 12:09 pm
by WhiteRider
I'll get someone who knows more about postgres to take a look at this for you..
Re: How to move a Observed HH database?

Posted:
Mon Nov 17, 2008 12:32 pm
by kraada
Those errors seem to imply that the database already existed.
Did your data get imported at all or does the database seem empty in PT3 after you restart PT3?
Re: How to move a Observed HH database?

Posted:
Mon Nov 17, 2008 2:01 pm
by Jouni85
Yup, didn't get it working with restore. I recommend everyone to export every single hand and import them to a new database. I guess something went wrong in backup process (missing header in .tar -file).
I created a new database with pgadmin and clicked restore, it took about an hour to import a 3gig .tar file but in the end error message came regarding the missing header. But now I'm importing all the hand history files... 450megs of those and looking like a 3 hour process.
There's nothing when I open PT3 but in postgres folder, there became like 2,5 gigs of data.