After upgrading my MacMini home server from OS-X 10.7 (Lion) Server to OS-X 10.8 (ML) + Server.app, I saw PostgreSQL 9.1.4 was released.
Unfortunately, the setup process for PostgreSQL 9.1.4 has created these brand new databases: collab, webauth, postgres, tempalte0, template1; all the other databases and roles created by me seem to have been deleted!
To better understand what has happened:
> Which postgres
OSX 10.7.4: /usr/bin/postgres
OSX 10.8: /Applications/Server.app/Contents/ServerRoot/usr/bin/postgre
$PGDATA is now on:
OSX 10.7.4: "/var/pgsql"
OSX 10.8 "/Library/Server/PostgreSQL/Data"
After the update the /var/pgsql folder is gone.
Since I do not want to repeat this experience in future updates, I think it is a good idea to create my database on a separate cluster/instance.
How would advise me from here?
- Is there any other way to avoid losing my databases?
- Where and how should I create my own databases without interfering with Apple's databases?
- How can I configure and start a second instance of PostgreSQL on the same OS-X server?
ps -ef | grep postgress– Ronda Aug 7 '12 at 10:16