PDA

View Full Version : 2 Computers/1 Database?



WahineLil
07-25-2008, 11:34 PM
I've searched the forums & the FAQ and maybe I missed it. Here's my question.

I play poker on 2 computers -- my desktop when I'm at home, and my laptop when I'm on the road (which is often). Is there a simple way to keep the database on my desktop synchronized with or identical to the database on my laptop?

I guess I could just constantly export & import hand histories, but I was hoping there was some simpler way to accomplish this. (And apologies if the solution is obvious and I'm just too dense to figure it out.)

morny
07-26-2008, 08:34 AM
If you installed PostgreSQL (which holds the database) on an external usb hard drive it might work. One thing i notice though when i unplug my hard drive which has PostgreSQL i need to restart the service manually but i guess thats not a big deal. It would then require you to have the usb hard drive connected to whatever PC your playing, havent tried this though so ill ask Roy to confirm.

Rvg72
07-26-2008, 01:00 PM
I'm not really sure about this either - I guess it is technically possible!

Roy

WahineLil
07-26-2008, 01:37 PM
Thanks. I actually got the same answer from someone over at DeucesCracked. I guess for now I'll just do the export/import thing and look into getting an external hard drive.

morny
07-26-2008, 05:11 PM
Ill do a test myself later with my laptop and PC since i already have an external hard drive before you go buying one and find out it dosent work.

punta
07-27-2008, 05:04 AM
I would be interest to see how you get on as well.

morny
07-27-2008, 10:43 AM
Will try this as soon as i get through these emails.

manicooller
07-28-2008, 09:47 AM
I've just purchased Holdem Manager and would like to do the same thing. I just bought a laptop and would like that to data mine and host my Databases (2 at the moment). I've tried just opening DBControlPanel and setting the IP to connect to that of my laptop. Although I get an error saying that it cant connect.

Would appreciate some insight as this was 1 of the main reasons I bought HM.

Thanks.

morny
07-28-2008, 04:47 PM
I tried without success but ive posted on a PostgreSQL forum to ask people if its possible so if i find out any information ill let you know.

I hoped it would be a matter of pluggin in the hard drive and going to services and restart it but although i can get into PGADMIN III all my server settings are blank so hopefully someone will have some suggestions on that forum

morny
08-07-2008, 03:19 PM
Hi,

Ok ive finally got this working, took a bit of tweaking etc but ive tired several times switching between the laptop and the desktop and it works fine with no problems. Windows XP and Windows Vista OS aswell.

Anyway as i done alot of tweaking im not sure of the exact setup but if someone who is interested in getting this up and running contacs me at morny@holdemmanager.net and ill give you instructions and in return let me know of any problems you come across so i can write a proper FAQ for it.

This will require uninstalling postgres and reinstalling it so before you start get your hands exported and database backed up in advance.

morny
08-19-2008, 11:23 PM
Heres the FAQ if anyones interested:

http://208.109.95.123/faq/?f=154

punta
08-20-2008, 09:33 AM
I will be doing this when I get my new laptop and I must say the FAQ was brill - THANKS.

One problem I have is i cant remember my password, so i checked out the FAQ again and I got this

I'm trying to connect to PostgreSQL now, but my username/password doesn't work. This is the one I just entered in installation, but it's not working. How can I retrieve it?

Answer / Solution

You cant retrieve it but in postgres you can edit the C:\Program Files\PostgreSQL\8.x\data\ph_hba.conf file and change md5 to trust and resave and it should be ok with any username or password.

Quick question -
# METHOD can be "md5", "reject", "md5", "crypt", "password",
# "krb5", "ident", "pam" or "ldap". Note that "password" sends passwords
# in clear text; "md5" is preferred since it sends encrypted passwords.

[B]Where do I change this to trust?? - thick question I know :)

morny
08-20-2008, 10:28 AM
if you open your holdemmanager.config folder in the Config folder in Holdem Managers directory with notepad it gives your username and password there so you can write it down.

Alternatively Roy now has HM programmed to force it to accept any username and password if you enter the incorrect ones but i havent tested how this will effect this type of setup but hopefully it should work.

punta
08-20-2008, 10:35 AM
Sorted - thanks - what service. Now please give me the 1.05.09 download link PLEASE PLEASE PLEASE

fabio
08-20-2008, 10:38 AM
You can force PostgreSQL to accept any username/password by doing this:

Go to C:\Program Files\PostgreSQL\8.3\data. There you open the pg_hba.conf with notepad. Scroll down to the bottom, you see:


# TYPE DATABASE USER CIDR-ADDRESS METHOD

# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
#host all all ::1/128 md5

Replace both the "md5" with "trust" and save the changes.

morny
08-20-2008, 12:01 PM
Sorted - thanks - what service. Now please give me the 1.05.09 download link PLEASE PLEASE PLEASE

You can keep the manager at 1.06 and revert the hud back to 1.05.09 by downloading http://www.rvgsoftware.com/hm/1.5.9hud.zip and unzipping those 2 files over the same 2 files in your holdem manager folder but im unsure how well it will work

originaL
08-28-2008, 08:06 PM
I just bought a new external HD for this. Can I format it to NTFS and access it properly if one computer is Windows XP and one computer is Vista? Or should I format it to FAT32?

fabio
08-28-2008, 08:43 PM
Ntfs

originaL
08-29-2008, 11:13 AM
I've backed up my database using:

c:\program files\postgresql\8.x\bin folder and run pg_dumpall -U postgres > *E*:\dbbackup.sql

Now that I have a backup of my database, I will go ahead with the FAQ installing SQL on both laptops.

Once I have SQL installed on both laptops how do I restore my existing database so the data goes into the data folder on the external HD? (so both PostgreSQL installations can access the data).

fabio
08-29-2008, 12:02 PM
psql -U postgres -f E:\dbbackup.sql postgres

originaL
08-29-2008, 12:38 PM
The FAQ instructs me to create a DATA folder on the external hard drive under then path: E:\Program Files\PostgreSQL\8.3\data (where E: is the external HD)

Is the psql -U postgres -f E:\dbbackup.sql postgres command still the same given this???

fabio
08-29-2008, 12:58 PM
You can create that folder, it wont hurt :)

originaL
08-29-2008, 01:10 PM
Do I have to type psql -U postgres -f E:\dbbackup.sql on BOTH laptops????

the data backup is on my external drive - I now have 2 instances of SQL installed (one on each laptop)

Do I now go into BOTH laptops command prompts and type

psql -U postgres -f E:\dbbackup.sql


??

originaL
09-15-2008, 07:13 PM
I've successfully ran HEM on 2 laptops using an external USB HD for about 3 weeks now. I've recently came across a small issue that is easily resolved for WinXP users.

Issue: Windows XP hangs as its booting up to the desktop - cursor and desktop wallpaper appear, but taskbar, desktop icons take 2-5 minutes to load

Solution: postgreSQL is trying to boot up but cannot find the data directory due to it being located on the external HD. It continues to search for the external HD and gives up after a couple minutes.

Go into your services manager in WinXP and set the start-up attribute to "manual". There is no need for it to be automatic anyway since you will generally have to restart the service as you unplug and plug-in your external HD.

(this of course only applies when your external HD is NOT plugged in during boot-up)

morny
09-15-2008, 09:45 PM
Damn i thought my computer was on its last legs taking this long to start and so ive order a dell XPS, no point changing my mind now:D

rushhour
09-17-2008, 04:11 AM
Just for u to know, it is possible to connect to your hm db through internet so u don't have to put the db on a external HD. But this can only be done if u know how to setup your router if u have one and several settings in postgres. I got it to work but i'm not sure what settings did the trick.

fortyseven
09-17-2008, 07:30 PM
Just for u to know, it is possible to connect to your hm db through internet so u don't have to put the db on a external HD. But this can only be done if u know how to setup your router if u have one and several settings in postgres. I got it to work but i'm not sure what settings did the trick.

So share with us. Dont you get lag when playing?

For all you guys that are working with the external HD, How big you think it should be? Doesnt a pen or a memory card should do the trick?
I hv my PT2 with about 200k hands on it and the folder is just about 2gb,
How big you think it will get on HM? Dont you think a 8gb memory card will be the perfect thing for this?

rushhour
09-22-2008, 02:52 PM
I haven't tried the HUD through internet but accessing the DB using HM is working fine. U'll have to edit the firewall settings in the router if u have one.

I do use the HUD on my laptop connected to the local LAN. HM connects through the LAN to my desktop. I guess the only thing has to be done is edit the "C:\Program Files\PostgreSQL\8.3\data\pg_hba.conf" of postgres 8.3. I've added:

host all postgres 0.0.0.0/0 md5

at the bottom and disabled the other settings in the file using a "#". And offcourse u'll have to edit the connection settings of the databasemanagement to the ip of your desktop.
But remember this means that any ip can access your DB if they have your username and password of postgres.

morny
09-22-2008, 05:44 PM
You could maintain a database certainly under 16GB and still have a pretty big one as long as your deleting files older than 6-9 months, 8GB might be a bit tight but definetely possible if your not a big miner, id imagine the majority of people have under 8GB

erikejw
09-22-2008, 06:48 PM
I'd go with a 2.5" external that draws the power from USB.
Then you have no need to bring a transformator or powercord any or anything else you rather leave at home.

erikejw
09-22-2008, 06:51 PM
An even better solution is to put the psql on a separate server and then you can connect to it from your laptop.

I put up a psql server where I run some other stuff too, it works fine. If you have a slow internet or will use a slow internet with your laptop it might not work satisfactory though.

I have no idea how much bandwith HM needs to feel snappy.

punta
10-03-2008, 12:58 PM
started to do this today - BUT I have vers 8.2 on my desktop and 8.3 on my laptop - WHAT now. I have done the first part and was just about to change the registry on the laptop and noticed 8.3 :( Not gonna work now is it. Will stop and see what you guys say

Cheers,

Paul

morny
10-03-2008, 03:15 PM
Should be able to google and find that version of postgres but it might work with 2 different versions i just never checked it

originaL
10-03-2008, 03:43 PM
I'm by no means a PostgreSQL expert, but I believe I am one of the few who has successfully ran HM this way for the last couple months.

If I was you, I would backup your database, remove 8.2 from the one computer and install 8.3 on both computers. Thats what I did.

punta
10-04-2008, 06:30 PM
Tried to back up my database as in the FAQ and my hm has a big red X on it and when i try to back up it just freezes - THE NIGHTMARE CONTINUES :( I have now reversed everthing i have done, so i can back up my data base and put 8.3 on the desktop, as it will NOT work on my usb drive sharing with two diff versions I have discovered.

What do i do now with regards backing up my database please?

paul

punta
10-05-2008, 04:30 AM
Tried to back up my database as in the FAQ and my hm has a big red X on it and when i try to back up it just freezes - THE NIGHTMARE CONTINUES :( I have now reversed everthing i have done, so i can back up my data base and put 8.3 on the desktop, as it will NOT work on my usb drive sharing with two diff versions I have discovered.

What do i do now with regards backing up my database please?

paul


well i have now sorted out backing the DB up. Had to stop it and then start the DB and the red x went. Not sure if I want to continue anymore, every step seems mega aggro :(

punta
10-08-2008, 06:12 AM
God this is a friggin pain - I have zapped 8.2 and I am now trying to install 8.3 I have followed the FAQ with a new install and put the data file to my new drive. It starts to install so far, then stops and says user postgres could not be created, the user account already exists - it then rolls back :mad:

What now, as i would love to get this to work.

Paul

morny
10-08-2008, 10:17 AM
try holdemmanager as the username for both parts where it requests a username

punta
10-08-2008, 11:21 AM
Right i have them up and running off my usb - but i want to restore my database now to this seperate drive. Which I dont seem able to do with pgadmin. I can find the database to restore, but i dont seem to be able to change the address to restore to my usb drive. It either freezes up or goes though the whole process but nothing is updated.

Please talk me though this :) its all very NEW to me.

morny
10-08-2008, 04:54 PM
Damn i answered this already but it must have got stuck in cyberspace.

Here goes again:

On the PC with the database go to C:\Program Files\PostgreSQL\PostgreSQL8.x\Data and copy all the files in there.

Then on the USB you need to copy them files to C:\Program Files\PostgreSQL\PostgreSQL8.x\Data

Then install PostgreSQL at that same location I.E C:\Program Files\PostgreSQL\PostgreSQL8.x (x will either be 2 or 3 depending on the version your using) and when you get to the install screen where it asks for your username the 2nd time untick the initialise database cluster screen and finish the installation and that should be it

Luckbox
11-08-2008, 08:11 PM
Since I run HM on two computers (Workstation and Laptop) I have the problem that I have to import all mined HH's twice, and since my laptop is quite slow (it imports at 10-20 h/s) I would like to set up some kind of shared-db-thing...

Would it be possible to store the db in a shared folder through my local network workgroup? The idea to use an external drive sounds a bit clumsy... :rolleyes:

What other options are there? Some kind of server running linux and psql??

morny
11-08-2008, 08:34 PM
Yeah its the same thing, the external data drive is basically just a folder so follow the instructions the same and use a network folder or whatever folder you want instead of the external hard drive

Luckbox
11-09-2008, 09:55 AM
Thanks for the tips. However, I found this in the FAQ so I followed these instructions instead: http://www.holdemmanager.net/faq/?f=161
...worked perfectly.


BUT - I spent 3 hours on trying to figure out why my laptop couldn't connect to my other pc... it turned out to be the windows built-in firewall that was the problem, turning it off solved the problem. (I have a 3rd party firewall as my main firewall).

punta
11-10-2008, 02:58 PM
Followed the FQA stuff as I like this idea better than using another drive - I have taken postgres off my laptop now and done all the other stuff, but unsure what to do when I start HM up on the laptop and I get the connection bit - what do I put in ? I know my main pc's IP address, but not sure what else I have to do and where do I put it?

Help needed - Paul

morny
11-10-2008, 08:38 PM
Someone on boards wrote that explanation in a thread and asked for it to be added to the FAQ but to be honest im not familiar with that and ive never tried it. maybe try posting on the PostgreSQL forums

daleburner
12-08-2008, 09:27 PM
I got a laptop and have been going through the process of moving my database from my desktop to an external drive with the help of the FAQs. I think I'm almost there, but I can't seem to successfully install postgreSQL on my laptop. Everything is fine up through when it starts installing, then I get an error message during the install and it refers me to the log. The last few lines of the log say this:

processed file: C:\Program Files\PostgreSQL\8.3\StackBuilder\i18n\tr_TR\wxstd .mo
processed file: C:\Program Files\PostgreSQL\8.3\tmp\pgperm.log
The Cacls command can be run only on disk drives that use the NTFS file system.

I saw people post the process for converting the drive from FAT to NTFS, but they were getting a different error message than this. Do I need to do the same thing? Do I need to conver the laptop or the external drive or both?

Thanks.

DK115
12-09-2008, 04:02 AM
Hi Punta,

Missed your question.

When getting the Connections screen you put in the Ip adress of your Database server; the machine where the sql database is on.

Suppose you have DB on your PC and your opening HM on the laptop: put in the IP of the PC; On the PC you can use localhost (since this is the databaserver)

morny
12-09-2008, 07:06 PM
I got a laptop and have been going through the process of moving my database from my desktop to an external drive with the help of the FAQs. I think I'm almost there, but I can't seem to successfully install postgreSQL on my laptop. Everything is fine up through when it starts installing, then I get an error message during the install and it refers me to the log. The last few lines of the log say this:

processed file: C:\Program Files\PostgreSQL\8.3\StackBuilder\i18n\tr_TR\wxstd .mo
processed file: C:\Program Files\PostgreSQL\8.3\tmp\pgperm.log
The Cacls command can be run only on disk drives that use the NTFS file system.

I saw people post the process for converting the drive from FAT to NTFS, but they were getting a different error message than this. Do I need to do the same thing? Do I need to conver the laptop or the external drive or both?

Thanks.

Yeah youll need to convert to NTFS on both systems, i cant remember if its HM or PostgreSQL but one of them require it

daleburner
12-09-2008, 07:51 PM
Okay cool. When you say both systems, the desktop seems to be working fine. Do you mean the laptop and the external drive. Can an external drive be/need to be converted? I don't know anything about that stuff.
thanks.

morny
12-09-2008, 10:08 PM
It would be unusual for both of them to be FAT, IIRC it prompts you to tell you or you can check yourself by rightclicking the hard drive and checking the properties, if both are FAT then id change both, google how to do it as its pretty easy and you dont lose any data

Antix
12-25-2008, 07:57 PM
Hi, I have followed all of the instructions on the site, but when I try to connect i get a connection error and sayign something about SSL on my second computer. Any help?

NM i got it fixed.