How to move a Observed HH database?

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

How to move a Observed HH database?

Postby langejan » Sun Nov 16, 2008 11:28 am

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.
langejan
 
Posts: 16
Joined: Tue May 20, 2008 5:14 pm

Re: How to move a Observed HH database?

Postby WhiteRider » Sun Nov 16, 2008 3:56 pm

You will need to backup and restore the database to your laptop.
See the Database / Postgres FAQ.
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: How to move a Observed HH database?

Postby langejan » Sun Nov 16, 2008 6:41 pm

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,
langejan
 
Posts: 16
Joined: Tue May 20, 2008 5:14 pm

Re: How to move a Observed HH database?

Postby WhiteRider » Mon Nov 17, 2008 5:15 am

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.
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: How to move a Observed HH database?

Postby Jouni85 » Mon Nov 17, 2008 11:37 am

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.
Jouni85
 
Posts: 6
Joined: Fri Feb 01, 2008 3:00 pm

Re: How to move a Observed HH database?

Postby WhiteRider » Mon Nov 17, 2008 12:09 pm

I'll get someone who knows more about postgres to take a look at this for you..
WhiteRider
Moderator
 
Posts: 54018
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: How to move a Observed HH database?

Postby kraada » Mon Nov 17, 2008 12:32 pm

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?
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: How to move a Observed HH database?

Postby Jouni85 » Mon Nov 17, 2008 2:01 pm

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.
Jouni85
 
Posts: 6
Joined: Fri Feb 01, 2008 3:00 pm


Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 19 guests

cron
highfalutin