Restoring database from Time Machine

PostgreSQL is the database server used to store information. Do you have a question or are you having problem with PostgreSQL? If so, post them here.

Moderator: Moderators

Restoring database from Time Machine

Postby BoiledFrog » Fri Nov 18, 2011 10:48 am

I forgot to start up the database before I started PT3. I started the database and tried to reconnect without quitting PT3. I thought it would connect but it blanked out my database instead.

It looks like I have all the text hand histories but I would like to recover the database if possible so I can get my reports, stats, and notes back. Time machine was running so I should have all the data. Is it as simple as replacing /Library/PostgreSQL/8.4/data with what I have in Time Machine. I also assume that I have to stop Postgres before I do this.

I am running Postgres 8.4 on Mac OS X Lion.
BoiledFrog
 
Posts: 59
Joined: Thu Aug 25, 2011 9:03 am

Re: Restoring database from Time Machine

Postby kraada » Fri Nov 18, 2011 10:52 am

Before restoring back to a prior state, please check to make sure PT3 didn't just forget where your database was. In Database --> Database Management, click New, then Browse and see if you can locate your database in there. If it's there, click on it and click Connect, and you can then set it as Active and Default and PT3 will use it going forward for you.

If it's not there, then your restoring to a prior state should work so long as it was not a state taken at a time when you were actively importing into the database.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Restoring database from Time Machine

Postby BoiledFrog » Fri Nov 18, 2011 5:45 pm

I couldn't successfully restore from Time Machine so I am going to reinitialize and import from the files. I want to delete all the existing databases and start from scratch. What's the best way to do this?
BoiledFrog
 
Posts: 59
Joined: Thu Aug 25, 2011 9:03 am

Re: Restoring database from Time Machine

Postby kraada » Fri Nov 18, 2011 6:14 pm

If PostgreSQL is installed and functioning there is no need to uninstall it. In PT3 click Database --> Database Management --> New to create a new database. Name it whatever you like, set it as Active and Default. Import your hands there. Later, in the Database Management window you can Delete the old databases not in use and that will remove them (permanently) from your machine.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Restoring database from Time Machine

Postby BoiledFrog » Fri Nov 18, 2011 7:23 pm

OK, it looks like I got all my data back. When I tried to create a new database under the old name it complained about the database already existing. As kraada suspected more than eight hours ago the database was just hidden. I connected to it and PT ground away for a few minutes and everything was there except for yesterday's hands. I imported these manually and all my data seems to be back. I can see my reports. I can see my notes. I am very happy. Thanks kraada!

Now, since I found out that the Time Machine backup isn't necessarily going to work, I am going to do a backup from PT3. I have a couple of questions about it:

1. Can it be automated so it runs every time (or every x times) when shutting down the application?
2. Why aren't "Aggregated Notes" and "Aggregated Filters" selected by default in the backup dialog.

Many Thanks.
BoiledFrog
 
Posts: 59
Joined: Thu Aug 25, 2011 9:03 am

Re: Restoring database from Time Machine

Postby WhiteRider » Sat Nov 19, 2011 5:01 am

1. No, there is no automation to the backup process at the moment.
2. Notes and filters are stored in each database (so will be included when you make a backup of a database). The "aggregated" part of the backup is only necessary if you want to "export" them from a certain database to restore into another database.

Tutorial: Backup and Restore
WhiteRider
Moderator
 
Posts: 54017
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


Return to PostgreSQL [Read Only]

Who is online

Users browsing this forum: No registered users and 26 guests

cron