I have a similar problem, and have gotten as far as needing to know the default superuser for postgresql, or how to create one.
I had a 10.8.5 system with what I assume to be a 2.x version of Server.app on a 2010 Mac Mini Server (originally 10.6). The system hard drive went bad. I initially restored form Time Machine onto a new drive, but found there were some other recurring issues in the system log. Wanting to upgrade anyways, I installed 10.10 on the new hard drive and attempted to recover data from Time Machine. I have restored everything I was looking for, with the exception of Wikis.
I have a dumpall.psql.gz file that appears to be a good backup, as well as the /Library/Server/WIki/FileData still in Time Machine. This post helped me find the new postgresql instance: Yosemite Server - postgres not running
However, the only role that I can find on this instance is _devicemgr, and I don't see any helpful existing schemas:
postgres-> \dg+
List of roles
Role name | Attributes | Member of | Description
------------+------------+-----------+-------------
_devicemgr | Create DB | {} |
postgres-> \dnS+
List of schemas
Name | Owner | Access privileges | Description
--------------------+------------+--------------------------+------------------- ---------------
information_schema | _devicemgr | _devicemgr=UC/_devicemgr+|
| | =U/_devicemgr |
pg_catalog | _devicemgr | _devicemgr=UC/_devicemgr+| system catalog schema
| | =U/_devicemgr |
pg_temp_1 | _devicemgr | |
pg_toast | _devicemgr | | reserved schema for TOAST tables
pg_toast_temp_1 | _devicemgr | |
public | _devicemgr | _devicemgr=UC/_devicemgr+| standard public schema
| | =UC/_devicemgr |
(6 rows)
So, my attempts to import look like:
> sudo psql -U _devicemgr -d postgres -f ~/Desktop/dumpall.psql -h /Library/Server/ProfileManager/Config/var/PostgreSQL
SET
SET
psql:/Users/dwalin/Desktop/dumpall.psql:12: ERROR: permission denied to create role
psql:/Users/dwalin/Desktop/dumpall.psql:13: ERROR: must be superuser to alter superusers
psql:/Users/dwalin/Desktop/dumpall.psql:14: ERROR: permission denied to create role
psql:/Users/dwalin/Desktop/dumpall.psql:15: ERROR: role "_postgres" does not exist
psql:/Users/dwalin/Desktop/dumpall.psql:16: ERROR: permission denied to create role
psql:/Users/dwalin/Desktop/dumpall.psql:17: ERROR: role "caldav" does not exist
psql:/Users/dwalin/Desktop/dumpall.psql:18: ERROR: permission denied to create role
psql:/Users/dwalin/Desktop/dumpall.psql:19: ERROR: role "collab" does not exist
psql:/Users/dwalin/Desktop/dumpall.psql:20: ERROR: permission denied to create role
psql:/Users/dwalin/Desktop/dumpall.psql:21: ERROR: role "webauth" does not exist
psql:/Users/dwalin/Desktop/dumpall.psql:32: ERROR: role "caldav" does not exist
psql:/Users/dwalin/Desktop/dumpall.psql:33: ERROR: role "collab" does not exist
psql:/Users/dwalin/Desktop/dumpall.psql:34: ERROR: database "collab" does not exist
psql:/Users/dwalin/Desktop/dumpall.psql:35: ERROR: database "device_management" already exists
REVOKE
psql:/Users/dwalin/Desktop/dumpall.psql:37: ERROR: role "_postgres" does not exist
psql:/Users/dwalin/Desktop/dumpall.psql:38: ERROR: role "_postgres" does not exist
GRANT
psql:/Users/dwalin/Desktop/dumpall.psql:40: ERROR: role "webauth" does not exist
psql:/Users/dwalin/Desktop/dumpall.psql:43: \connect: FATAL: database "caldav" does not exist