Restored Time Machine Backup and Can't Access DB

A special forum dedicated to our PT4 for Mac OS X users

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Restored Time Machine Backup and Can't Access DB

Postby dastingerpt » Mon Apr 20, 2015 12:13 pm

Hello,

Yesterday I decided to give Yosemite a shot to see if the bugs were already ironed out and, after a bit of testing I decided to get back to Mavericks so I fired up my TM backup and restored my entire drive using it. The backup was made only 1 hour before installing Yosemite to make sure nothing was lost.

Everything went great and I thought everything was working but now I was about to start today's session and PT tells me that it's not possible to connect to the default database. I don't know what to do. Creating a new one is possible so PostgreSQL is running but when I try to go to DB Management window and select my main DB it tells me to choose from the valid databases. My main DB is greyed out and the size is N/A. The port is the same, user also the same. I know I should've made a backup but restoring from a TM backup is like copy/pasting an entire drive so I didn't think there would be a problem.

I really don't want to lose my 14GB DB. Any idea of how to solve this?
dastingerpt
 
Posts: 38
Joined: Mon Feb 24, 2014 8:27 pm

Re: Restored Time Machine Backup and Can't Access DB

Postby dastingerpt » Mon Apr 20, 2015 1:10 pm

Sorry for the double post but just to add a few things.

- I tried restoring again in case something went wrong the first time and I still have the same problem;
- The user PostgreSQL is there and, again, creating a new DB works;
- I tried backing up the DB and it recognises that it's 14GB but then it shows an error saying something about a file it cannot access;
- If I open pgAdmin3 and connect to the server it sees the Database but it has an X on top of it and, when I click on it, I get this error message:

Image
dastingerpt
 
Posts: 38
Joined: Mon Feb 24, 2014 8:27 pm

Re: Restored Time Machine Backup and Can't Access DB

Postby kraada » Mon Apr 20, 2015 2:45 pm

Are you certain that the /Library/PostgreSQL folder was backed up by Time Machine? I don't believe that folder tree is backed up by default - and that's where your database is. The error is implying that the data folder does not exist.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Restored Time Machine Backup and Can't Access DB

Postby dastingerpt » Mon Apr 20, 2015 2:49 pm

Yes, even though I can't access the folder while on my main admin account*, the folder is there. I've changed permissions on those folders so I could take a look and the 14GB folder containing my DB is there.

* - There's a prohibition sign over the folder. That's what happens when you try to access a folder that belongs to another user on OS X. But as soon as I give Read permissions to everyone on that folder I am able to open it and see that there are lots of folders in there, including one that's 14GB which is the exact size of my DB
dastingerpt
 
Posts: 38
Joined: Mon Feb 24, 2014 8:27 pm

Re: Restored Time Machine Backup and Can't Access DB

Postby kraada » Mon Apr 20, 2015 2:58 pm

Make sure that folder then is owned by the postgres user and that the postgres user has read/write access to that folder and everyone else has no access. If the permissions are otherwise then PostgreSQL won't start up (it's a security precaution).
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Restored Time Machine Backup and Can't Access DB

Postby dastingerpt » Mon Apr 20, 2015 3:02 pm

Only the user postgres has Read & Write access to the folders Library/PostgreSQL/9.3/data and Library/PostgreSQL/9.3/Library. I only gave Read access to everyone to check if the DB was still there but reverted the changes afterwards.
dastingerpt
 
Posts: 38
Joined: Mon Feb 24, 2014 8:27 pm

Re: Restored Time Machine Backup and Can't Access DB

Postby kraada » Mon Apr 20, 2015 4:03 pm

When you looked was the PG_VERSION file there?
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Restored Time Machine Backup and Can't Access DB

Postby dastingerpt » Mon Apr 20, 2015 5:14 pm

It was so obvious that I had to look for that specific file that I don't know how I didn't think of it. Checked again and, no, it is not there. Am I screwed? :(
dastingerpt
 
Posts: 38
Joined: Mon Feb 24, 2014 8:27 pm

Re: Restored Time Machine Backup and Can't Access DB

Postby dastingerpt » Mon Apr 20, 2015 6:39 pm

I remembered that I have a backup from December and thought that maybe my only way out is to restore that DB and manually reimport all the hands I played since then. I tried to do it and it says that it's not possible to restore because that DB already exists so I need to delete my DB first. I'm not sure about this since I want to make sure that I don't lose anything. Should I be safe deleting the DB and doing the process mentioned above?

Also, the restore process failed but 8GB of space disappeared from my SSD and did not come back after it failed. Where are temp files stored?
dastingerpt
 
Posts: 38
Joined: Mon Feb 24, 2014 8:27 pm

Re: Restored Time Machine Backup and Can't Access DB

Postby dastingerpt » Mon Apr 20, 2015 7:54 pm

Found the folder containing the temp files for the failed restore.

Sorry for the double/triple posts but I can't edit them after a while.
dastingerpt
 
Posts: 38
Joined: Mon Feb 24, 2014 8:27 pm

Next

Return to PT4 for macOS

Who is online

Users browsing this forum: No registered users and 13 guests

cron
highfalutin