PDA

View Full Version : Tranfer databases between 2 laptops



sttf
04-10-2013, 02:38 PM
Hi! I see lots of posts and intructios about this but it is still confused. I think you should do a complete tutorial about this because there is so many people with problems doing it.

So I have 2 laptops with holdem manager and postgres intalled.

On my old laptop i had the full database on a HD with 500GB. My new laptop had an SSD 120GB.

After backup on my old laptop it generates a file with ~5GB. When i try to restore it on my new laptop it eats all my SSD space without restore it.

So what i like to know is:

1. How can i know how many space my database have (in my old laptop)?

2. How many space i need on my new laptop using backup/restore function?

3. What is the best option to tranfer the database and how can i do it?

Thank you

udbrky
04-10-2013, 09:25 PM
Out of HM1, HM2, PT3, HM2 has by far the smallest DB's.

Some SSD's now use compression automatically. The Truth About SSDs and Compression (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:

Best practices for NTFS compression in Windows (http://support.microsoft.com/kb/251186)

You can put your postgres data folder and the HM2 database parent folder on a different drive.

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, many of which are yet to come. If you don't want the space in your Roaming folder due to C: file space or something like that, we do give you the option of storing this data anywhere

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 as 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 also run tree size free to locate wastes of space:

TreeSize Free - Quickly Scan Directory Sizes and Find Space Hogs (http://www.jam-software.com/treesize_free/)

Please see this 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)


It should not use that much space to transfer files. How many hands are in your database? With 120GB, you will most likely want a second drive to use to store data.