Page 1 of 1

Restoring database from Time Machine

PostPosted: Fri Nov 18, 2011 10:48 am
by BoiledFrog
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.

Re: Restoring database from Time Machine

PostPosted: Fri Nov 18, 2011 10:52 am
by kraada
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.

Re: Restoring database from Time Machine

PostPosted: Fri Nov 18, 2011 5:45 pm
by BoiledFrog
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?

Re: Restoring database from Time Machine

PostPosted: Fri Nov 18, 2011 6:14 pm
by kraada
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.

Re: Restoring database from Time Machine

PostPosted: Fri Nov 18, 2011 7:23 pm
by BoiledFrog
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.

Re: Restoring database from Time Machine

PostPosted: Sat Nov 19, 2011 5:01 am
by WhiteRider
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

highfalutin