PDA

View Full Version : Archive and handhistory directory question



sirpreis
03-30-2016, 07:30 AM
I'm not quite sure how the Archive (HM2Archive) and Handhistory directories work, so maybe someone could enlighten me.

As I understand it at the moment, when the Pokersite client creates a handhistory file, HM2 reads that file, writes something in the Postgres database and also creates files for that player in the Archive directory. After some time that original handhistory file is than moved to the directory that is specified in "Site setup" -> "Archive to". Is that correct?

If so, is it even necessary to archive the handhistory files themselves? It's basically a duplicate file, because the handhistory information is already stored in the corresponding HM2Archive/Player file, isn't it?

And one more thing: As HM2 seems to be using a flat file structure for each player, that creates huge directories which might be a pain to back up (my Archiv/Players directory contains almost 300.000 files). Is there some way to maybe zip all of those files, or will HM2 then not be able to access information that it would take from those files?

Thank you!

udbrky
03-30-2016, 08:42 PM
I think you're mixing up the database and the archive in some spots.

Sites write hand history files to the folder.

HM2 parses the information and writes it to the database file.

After the file is done (usually 15 minutes after the last hand was played), the file is moved to the archive for storage.

Postgres is a relational database program that uses the SQL language to create the database entries.

HM2 uses the flat files, yes. The database is split between the postgres data folder and HM2 parent folder.

It is the smallest database though, between HM1, PT3 and PT4.

sirpreis
03-31-2016, 12:28 AM
Thanks.

As it still isn't quite clear to me: I have a HM2Archive folder that's basically part of the database (containig subfolders "Importing" and "Player" (which itself has a subfolder for each player)), and then I have another archive folder where HM2 moves the original handhistory files. Is that correct? And if so, is it even necessary to keep the original handhistory files?

fozzy71
03-31-2016, 08:42 AM
Thanks.

As it still isn't quite clear to me: I have a HM2Archive folder that's basically part of the database (containig subfolders "Importing" and "Player" (which itself has a subfolder for each player)), and then I have another archive folder where HM2 moves the original handhistory files. Is that correct? And if so, is it even necessary to keep the original handhistory files?


The folder in your \users directory that has the importing/player folders is not an archive folder. It is part of the postgresql database combined with the \data folders in your main \postgresql folder in \program files.

Some SSD's now use compression automatically - http://rscott.org/ssd/SSDs_and_compression.htm

You can also use NTFS compression on the DB folder in roaming and the postgres\data\base folder to make it smaller - http://support.microsoft.com/kb/251186

You can put your postgres data folder and the HM2 database parent folder on a different drive but if you move it from a SSD to a HDD you will suffer a decrease in performance - Hold'Em Manager 2 FAQs - Poker Software :: Move Database to Another Hard Drive or Partition (http://hm2faq.holdemmanager.com/questions/1172/Move+Database+to+Another+Hard+Drive+or+Partition)

In HM1 there are a lot of tables that deal with a specific hand played by a specific player. In HM2 we don't have these tables, instead, for player related hand data, we use a flat file approach. Each player has his own folder and each file represents a single day. Each line within the file is a tokenized version of a single hand with incredible amounts of detail.

Your overall HM2 spaced used (DB + Files) is about 2/3 of HM1 and we store probably 2-3 times as much info plus it can be accessed many, many times faster and allows us to do some things that wouldn't be possible otherwise. If you don't want the space in your Roaming folder due to limited C: file space, we do give you the option of storing this data anywhere when creating the database.

General rule is 1 million hands = 10 GB.

In reality it's: 1 million hands
HM1: 6.8 GB
HM2: 4.3 GB
PT4: 13.6 GB

So with a 10 million hand database you need a SSD of at least 60 GB (Windows) + 100 GB = 160 GB. We use 1 million = 10 GB (instead of 6.8) because when you want to perform a vacuum/analyse or backup/restore a database it will require a LOT of disk space to perform such a task.

You can use this FAQ to try and fee up more space - Hold'Em Manager 2 FAQs - Poker Software :: I'm Running Out of Disk Space (http://hm2faq.holdemmanager.com/questions/2891/I%27m+Running+Out+of+Disk+Space)

Please see these guide to optimize your SSD:

Can You Get More Space Or Speed From Your SSD? - Optimizing Precious Solid-State Storage (http://www.tomshardware.com/reviews/ssd-performance-tweak,2911.html)

High tech company strategies (http://itexpertvoice.com/home/super-fast-ssds-four-rules-for-how-to-treat-them-right/)

sirpreis
03-31-2016, 09:03 AM
Thank you.

I don't have a "problem" with the size of the HM2 database folder (containing the Importing/Player folders), but rather with the number of files it contains (~300.000). I was setting up a backup job and it seems to take a big amount of time to backup those files. If all of those 300k files were for example zipped to one zip-file, it would be a lot quicker to backup (but of course that wouldn't work with HM2/Postgresql).

Of course, it's just a one time job to complete that initial backup, and then it's just adding new files that were added since the last backup, so it's not a major problem.

Now, if I (hopefully) understand correctly, it's basically not necessarry to keep the archived handhistory files, because all of the information is stored in the database + the database folder?

udbrky
03-31-2016, 09:12 PM
You should keep the originals, backed up on an external.

Please see this FAQ to transfer/backup data:

Hold'Em Manager 2 FAQs - Poker Software :: What Files Should I Backup to Protect my Holdem Manager? (http://hm2faq.holdemmanager.com/questions/2151/What+Files+Should+I+Backup+to+Protect+my+Holdem+Ma nager%3F)

This will ensure that you have your hand histories and HUD saved to import into a new computer, and as a backup to restore in case of an emergency. I recommend you do this at least once a month and keep the last 2 or 3 most recent backups (and your \HM2Archive folder) stored on an external drive and/or cloud storage site like dropbox or google drive.

sirpreis
04-04-2016, 06:24 AM
Should I be making backups of the database folder? Or is it enough to make regular (manual) backups through the HM2 Database settings dialog (which I assume include those database folder files) and to keep the original handhistorys backed up as well?

fozzy71
04-04-2016, 08:35 AM
Just do the backups via HM2 (I recommend once a month, and keep the 2 or 3 most recent backups) and manually backup your \HM2Archive folder. You can also manually backup via PGAdmin (http://hm2faq.holdemmanager.com/questions/952/How+does+Backup+or+Restore+via+PostgreSQL+work%3F+ %28Advanced+Method%29) but the HM2 backups are fine for 99% of our customers and much simpler to do.

I keep my archive folder backed up in the cloud via dropbox as well as a daily AllWay Sync to a local NAS external drive. I personally don't do HM2 database backups since I don't make any personalized player/hand notes.

sirpreis
04-04-2016, 08:45 AM
Ok. Thanks for your answer. I will do that.

I'm always a fan of automatic backups (which HM2 probably isn't able to do), so I might try looking into automatic Postgres-Backups (which for example creates a DB backup once a week or so). That way I don't have to remember to make manual backups.

GaryPoker
04-04-2016, 09:20 AM
Hi i checked for the folder in my users directory but couldn't find it, could you confirm the path for this, thanks (the folder that contains the tokenised hand history data you referred to)

fozzy71
04-05-2016, 07:46 AM
Ok. Thanks for your answer. I will do that.

I'm always a fan of automatic backups (which HM2 probably isn't able to do), so I might try looking into automatic Postgres-Backups (which for example creates a DB backup once a week or so). That way I don't have to remember to make manual backups.

Anything automated for postgresql likely won't be able to backup the HM2 parent directory since that is something proprietary the database developer of HM1/2 came up with.


Hi i checked for the folder in my users directory but couldn't find it, could you confirm the path for this, thanks (the folder that contains the tokenised hand history data you referred to)

C:\Users\UserName\AppData\Roaming\HoldemManager\Da tabase

If you can't see it, turn off the windows option that is hiding that directory. FAQ - Hold'em Manager (HM1) Poker Tracking Software :: How to See Hidden Files in Windows (http://faq.holdemmanager.com/questions/130/How+to+See+Hidden+Files+in+Windows+)