Cannot perform manual Dump of postgres DB
Postgres manual DB dump fails. I receive the error
server version: 9.2.1; pg_dumpall version: 9.1.4
aborting because of server version mismatch.
I have a script that runs at night in tandem with my SuperDuper! backup software. The script stops the web services on my MacMini OSX server, then runs a db dumpall and copies that dump to a directory where then the SuperDuper includes it in the nightly backup. This script has been running rock solid for months. After the latest mac osx update however now this script errors out. And I receive the above error. I can no longer even run a dumpall from the command line I receive a permission denied response. I have contacted apple support, and they were unhelpful. Stating that they had nothing for me.
I have gone through on other forums and I have posted here some of the steps that we have undergone. Each without benefit. My script is not running, and my daily dump that is supposed to be happening in /Library/Server/PostgreSQL
| 12:05:32 AM | Info | ...ACTION: Preserving Spotlight state on Seagate
| 12:05:32 AM | Info | ......COMMAND => Disabling Spotlight search indexing on Seagate
| 12:05:32 AM | Info | ...ACTION: Running shell script backup.sh
| 12:05:32 AM | Info | ......COMMAND => Invoking Before Copy shell script: /System/backup.sh
|12:05:32 AM | Info | addressbook:state = "STOPPED"
| 12:05:32 AM | Info | addressbook:setStateVersion = 1
| 12:05:32 AM | Info | addressbook:readWriteSettingsVersion = 1
| 12:05:32 AM | Info | calendar:state = "STOPPED"
| 12:05:32 AM | Info | calendar:setStateVersion = 1
| 12:05:32 AM | Info | calendar:readWriteSettingsVersion = 1
| 12:05:54 AM | Info | wiki:state = "STOPPED"
| 12:05:54 AM | Info | devicemgr:state = "STOPPED"
| 12:05:55 AM | Info | web:state = "STOPPED"
| 12:05:55 AM | Info | web:status = 0
| 12:05:55 AM | Info | postgres:state = "RUNNING"
| 12:05:55 AM | Error | server version: 9.2.1; pg_dumpall version: 9.1.4
| 12:05:55 AM | Error | aborting because of server version mismatch
*****
/Applications/Server.app/Contents/ServerRoot/usr/sbin/serveradmin start postgres
SA6=$!
/usr/bin/wait $SA6
PGUSER=_postgres pg_dumpall >/Odbackup/cluster`date +\%Y\%m\%d`.dump
PS1=$!
******
dsync postmaster
berkeley:bin admin$ sudo pg_dumpall >/Odbackup/cluster`date +\%Y\%m\%d`.dump
-bash: /Odbackup/cluster20130206.dump: Permission denied
berkeley:bin admin$ PGUSER=_postgres pg_dumpall >/Odbackup/cluster`date +\%Y\%m\%d`.dump
-bash: /Odbackup/cluster20130206.dump: Permission denied
berkeley:bin admin$ pwd
/Applications/Server.app/Contents/ServerRoot/usr/bin
berkeley:bin admin$
*******:~ admin$ sudo updatedb && locate pg_dump | grep bin
Password:
sudo: updatedb: command not found
*******:~ admin$
******
berkeley:~ admin$ locate pg_dumpall
locate: locate database header corrupt, bigram char outside 0, 32-127: -1
berkeley:~ admin$ sudo find /usr -name pg_dump
Password:
/usr/bin/pg_dump
berkeley:~ admin$ /usr/bin/pg_dump --version
pg_dump (PostgreSQL) 9.1.4
******
berkeley:bin admin$ /usr/bin/pg_dumpall -U postgres > /tmp/cluster`date +\%Y\%m\%d`.dump
pg_dumpall: could not connect to database "template1": could not connect to server: Permission denied
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
Mac mini Server (Mid 2011), OS X Mountain Lion (10.8.2)