I have a PostgreSQL 8.3 data directory backup. I need to copy a database from this backup into a new PostgreSQL instance. Due to problems with the old server I cannot do a pg_dump of the database.
I have figured out which directory is for the database in question. In MySQL for instance all you would normally do is shutdown the server, copy the directory across and restart it and the database would be available. Now this does not work with PostgreSQL and I suspect it is because the database is not listed in global/pg_database file. This file seems to be auto-generated when PostgreSQL starts so how do I tell the system that the database is there?
Please be aware that in PostgreSQL, your cluster data directory is a self-contained unit that cannot reliably be restored in parts, as per the documentation here.
Your best hope is to use the full data directory of the old server and to start a server on it, then restore from a dump of the database you get from there:
That should get you set, or at least show a good path to get there.