PDA

View Full Version : What's the faster way of cloning a DB ?



Spec
02-10-2011, 09:48 AM
My DB has 65 million hands (300 Gb) but I don't want to purge hands.

However HUD it is becoming slow, specially when playing more than 12 tables.

I would like to make a clone of the DB and then, in the clone, purge all hands to keep only the stats. Hopefully HUD will become faster with that.

I could do a backup and then a restore to a new DB, but all this will take me more than 24 hours without being able to use HM.

If there a faster way of cloning a DB ?

Patvs
02-11-2011, 03:15 AM
Backup / Restore in pgadminIII is the fast way: http://faq.holdemmanager.com/questions/72/Backup+%26+Restore+Database

Since reimport the handhistories will take 100x longer.



Theoretically: you could copy the PostgreSQL/data/base/xxxxx folder with your database to a different location. Rename the xxxxx to a different number. Copy it back. (so you now have two massive base folders)
Rename your database in pgadminIII. Reinstall PostgreSQL. And with some LUCK it will detect both databases.