Re: recovering database from a linux file system

From: John R Pierce <pierce(at)hogranch(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: recovering database from a linux file system
Date: 2016-03-10 21:03:43
Message-ID: 56E1E12F.7030506@hogranch.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On 3/10/2016 12:25 PM, Alka Gupta wrote:
> Do you know if there is any encryption or security or will plainly copying
> the files will work? Do I need to know any db usernames and passwords, which
> obviously I don't have?

plain copy should be fine, any encryption would be file system level,
and if it was so encrypted you wouldn't have even been able to /see/ the
files.

modify pg_hba.conf to have...
local all all trust

as the first non-comment line, and pooof, no security on the databases
for local direct connections.

there's nearly always a 'postgres' user which is the server owner, and
primary database administrator account. you should create a unix user
'postgres', and use this user to start the database server via...

pg_ctl -D /path/to/pg/data (other options if need) start

and you should see any startup problems displayed on the console. if the
server actually starts, then it should start logging to
$PGDATA/pg_log/..... and you might tail the newest of those files to
see whats going on.

Q: is the pg_hba.conf and postgresql.conf files in the data directory,
or was this a ubuntu/debian setup where they put them in /etc/pgsql/...
? if its a debian/ubuntu setup a bunch of things were moved
around, logging is in /var/log/... the config files are in /etc and
so forth.

--
john r pierce, recycling bits in santa cruz

Browse pgsql-general by date

  From Date Subject
Next Message Karsten Hilbert 2016-03-10 21:09:43 Re: pg_restore without dropping db/table
Previous Message Melvin Davidson 2016-03-10 20:59:58 Re: pg_restore without dropping db/table