PDA

View Full Version : Problem with restoring database



smell777
11-12-2008, 07:51 AM
Hello!
I decided to move my database from my pc to laptop. I followed instructions from FAQ and backuped it. When I decided to restore it on my laptop, something went wrong ( I tryed two times) and now I have no database in Pgadmin and 30 GB of space which is occupied by some semirestored data:confused:
So can you please help me and tell me how and what can I delete to free my disc space? Thanks a lot.

fabio
11-12-2008, 09:05 AM
Is the database listed in pgAdmin? If yes, just delete it there.

The safest way to backup and restore the DB: http://208.109.95.123/forum/showpost.php?p=7254&postcount=2

smell777
11-13-2008, 09:30 AM
No, the database is not listed there. Thats why I don't know how to delete all that stuff.
Thanks for your way to backup Ill try it when i delete what I have now.
Btw I have exported all hands from the database. If i now simply copy this folder to my laptop and import it into HM, will the result be same as if I backuped and restored db?

fabio
11-13-2008, 10:17 AM
Yes

smell777
11-13-2008, 11:14 AM
Ok. And still the same question... I found that all 30GB data is stored at
...PostgreSQL\8.2\data\base
If I simply manually delete the content af this folder will my postgresql work properly still?
I have installed postgresql on my laptop recently so there is no other databases yet.
Thanks for your help.

morny
11-13-2008, 11:44 AM
Ok just to make sure were correct.

You want to move your HH to your laptop. You tried copying the data folder and it didnt work but you have your HH exported from the original database.

Now the problem is that the old data files is using up 30 gigs of space and you cant delete it via PG Admin so assuming thats the problem and you defo have a copy of all your HH files then do this:

Uninstall PostgreSQL and delete the PostgreSQL folder on the new computer, this will delete the 30 gig files taking up space. Then reisntall postgreSQL and youll have a new blank database. Lastly import the HH files you have into the new database.

smell777
11-18-2008, 09:03 AM
So... I've done reinstalling and tryed to create a backup using the method introduced by fabio in 2nd post. Unfortunately, when i click on pg_dumpall, the dos window opens and very quickly autocloses, so that I even can't read what is written there (I have XP, on my pc and using as admin there).
So i tryed to create a new backup using old method from FAQ, itr created a file of around 1,5 GB size, but my db is about 50GB there.
When i moved backupdb to my laptop and tryed to restore it, the comp freezed for several hours, then wnen freezing stopped, in that little window of pgadmin it was written about a number of mistakes and something like ''the process returned exit code 1'' or something like that and two options ''ok'' or ''cancel''. So i cliked ok and then the circle repeated and my disk space became shorter for 15 GB, then i tryed again and another 15 GB was taken, but no database was created or listed in pgadmin.

So i am completely lost and donno what to do now. Thanks for helping.

Al1
11-18-2008, 09:12 AM
Hi,

Have you tried to Export hands from your old database and then reimport those exported hands in your other computer?

It will recreate HHs in *.txt if you do that.

smell777
11-18-2008, 11:39 AM
Hi,

Have you tried to Export hands from your old database and then reimport those exported hands in your other computer?

It will recreate HHs in *.txt if you do that.
Oh, forgot to mention that. Yes I tried and if I understood correctly it had exported only my hands, but none of my datamined hands which I have a lot of. Is that correct or it must have exported all of them?

morny
11-18-2008, 11:56 AM
Yes HM exports all hands including datamined hands, its not possible to choose what to export and what not to, everything exports. Basically what you should be doing is deleting the PostgreSQL folder then reinstalling PostgreSQL and DONT RESTORE any database, just import them hands you exported into the new database

smell777
11-18-2008, 02:49 PM
Yes HM exports all hands including datamined hands, its not possible to choose what to export and what not to, everything exports. Basically what you should be doing is deleting the PostgreSQL folder then reinstalling PostgreSQL and DONT RESTORE any database, just import them hands you exported into the new database

Well, ok I'll try that again. But I have already doine it and after imported exported hands, my db was I guess twice samller ( ex. I had 65000 players on my pc and only 29000 on laptop). But I will do it again, I guess there was a mistake.

I will write here tomorrow.

Thanks a lot to all of you!