"Hancock, David (DHANCOCK)" wrote:
> Please--I have searched everywhere I can think of and have found no guidance
> for recovering databases where the /var/lib/pgsql/base directories are
> intact but there's no pg_dump file to work from. I need to do this because
> I stupidly but inadvertently uninstalled PostgreSQL and then had to
> reinstall it.
> 1. just copy the old base/* directories into the newly created
> /var/lib/pgsql/base directory. psql was not aware of the databases.
> 2. use createdb to create a database, and then copy the old data files into
> the corresponding base/<db> directory. psql said "couldn't open cache for
> user 40" or something similar.
> 3. modified uid for postgres user to 40, reinstalled PostgreSQL, did "2"
> again, similar result.
If the two PostgreSQL installations are the same major version, then you
copy the entire /var/lib/pgsql tree over. Not just the base/* trees.
What version, what OS?
--
Lamar Owen
WGCR Internet Radio
1 Peter 4:11