PDA

View Full Version : Restore DB problem



el_grande
01-08-2009, 01:56 PM
I'm using a primary desktop and secondary laptop with HEM. I saw the FAQ on sharing a single DB by storing it on an external USB drive, but I don't want to carry that around all the time. So this is how I deal with my DB:

- Desktop and laptop both have a DB with the same name stored locally
- The desktop is my primary machine
- When I play hands on my laptop, I export new hands and import to desktop
- Once a week I backup my desktop DB to an external drive then restore to laptop

This way I have multiple backups of the DB and don't have to carry an external drive around. The only problem with this is that my laptop DB doesn't always have the latest data from the desktop, but that's ok.

I went through that explanation in case someone can suggest a better way?

Here's the problem... When I restore my desktop DB to the laptop, all hands are added instead of overwriting duplicate hands. So my laptop DB is double size - duplicate hands. Do I have to delete or wipe my laptop DB every time I restore? Or is there some setting in postgre admin that tells it to to a full replace when doing a restore.

thanks

morny
01-08-2009, 08:24 PM
You shoulldd only use backup and restore the first time with a new database

To fix that problem on both your database export the hands http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=173 and then create a new database http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=146 and then reimport them and that will get rid of the duplicates
When your doing it in future just go to the C:/HMarchive folder which looks something like this:

2009 > 01 (thiis is the month) > 01,02,03,04

So in the above example thats all the hands for the 01-4th of January 2009, so just copy the neccessary folders for the days youd like to synchronise and then import them into the datbase but dont use the backup annd restore anymore.