PDA

View Full Version : Trouble restoring database



dojokid
11-01-2009, 01:11 PM
I got a new comp with windows 7 and I am trying to use my database from my other computer which I backed up onto an external hard drive.

On the new comp I first installed postgresql, making sure I unselected 'Initialize Database Cluster' in step 10 of http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=177

Now I am trying to follow these instructions to select my old database http://www.holdemmanager.net/faq/afmviewfaq.aspx?faqid=12

Step 4 of the later link is: '4) In pgAdmin, click on Edit > New Object > New Database. A New Database dialog will pop up'

I am unable to click 'New Object' because it is greyed over. Any suggestions?

Thanks!

netsrak
11-01-2009, 03:55 PM
When trying to restore a database from a backup you need a running cluster.

This option is only obsolete when you want to use a data folder from a previous postgresql installation.

Start the installation of postgresql again, initialize the cluster, create an empty database and restore again.

dojokid
11-02-2009, 06:11 PM
Ok I am attempting to start the installation again, however I am getting the error message : "data directory already contains a postresql databes of this version..."

so I followed these instructions


You must *fully* remove PostgreSQL if you want to install it again.

1. Uninstall from control panel. add/remove programs
2. manually delete the Program Files\Postgresql folders
3. run the command (no quote marks) - start > run > 'cmd' > "net user postgres /delete"
- reboot.

On the third step i get 'Access is denied'

I have been trying to install HEM and import my old database for 2 days now... I'm searching every forum etc but running into problem after problem...ugh!

fozzy71
11-02-2009, 07:12 PM
For reinstalling SQL to a new/empty DB, please follow these steps:

1) Uninstall PostgreSQL from the Windows Control Panel.
2) manually delete or rename the Program Files\Postgresql folders
3) run the command - start > programs > accessories > command prompt > right-click > run as administrator

net user postgres /delete
4) reboot.
5) Install PostgreSQL 8.4, with your firewall uninstalled or turned off if windows firewall - http://www.enterprisedb.com/products/pgdownload.do#windows