Re: Recover PostgreSQL database folder data

From: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>
To: Edson Lidorio <edson(at)openmailbox(dot)org>, Scott Mead <scottm(at)openscg(dot)com>
Cc: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Recover PostgreSQL database folder data
Date: 2017-04-21 21:02:30
Message-ID: feff34e9-699d-2f47-4afe-054dbf1bb101@aklaver.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 04/21/2017 01:53 PM, Edson Lidorio wrote:
>
>
> On 21-04-2017 17:43, Adrian Klaver wrote:
>> On 04/21/2017 01:36 PM, Edson Lidorio wrote:
>>>
>>>
>>> On 21-04-2017 17:27, Scott Mead wrote:
>>>> chown *-R* postgres:postgres /var/lib/pgsql/9.6/data
>>>
>>> Chown -R postgres: postgres /var/lib/pgsql/9.6/data
>>> Sudo systemctl start postgresql-9.6
>>
>> Is this on the first VM you showed previously or the new one you said
>> you where going to create?
>>
>>>
>>> Erros:
>>>
>>> Unit postgresql-9.6.service entered failed state.
>>> Abr 21 07:50:11 localhost.localdomain systemd[1]: postgresql-9.6.service
>>> failed.
>>> Abr 21 07:50:11 localhost.localdomain polkitd[693]: Unregistered
>>> Authentication Agent for unix-process:30276:3843896 (system bus name
>>> :1.486, object p
>>> lines 2341-2377/2377 (END)
>>>
>>>
>>> /var/lib/pgsql/9.6/data/" is missing or empty.
>>
>> Is it empty, because before it was not?
>>
>>
>>> Apr 21 07:50:11 localhost postgresql96-check-db-dir: Use
>>> "/usr/pgsql-9.6/bin/postgresql96-setup initdb" to initialize the
>>> database cluster.
>>> Apr 21 07:50:11 localhost postgresql96-check-db-dir: See
>>> /usr/share/doc/postgresql96/README.rpm-dist for more information.
>>> Apr 21 07:50:11 localhost systemd: postgresql-9.6.service: control
>>> process exited, code=exited status=1
>>> Apr 21 07:50:11 localhost systemd: Failed to start PostgreSQL 9.6
>>> database server.
>>> Apr 21 07:50:11 localhost systemd: Unit postgresql-9.6.service entered
>>> failed state.
>>> Apr 21 07:50:11 localhost systemd: postgresql-9.6.service failed.
>>>
>>>
>>
>>
> In the new

So why not try:

chown -R postgres:postgres /var/lib/pgsql/9.6/data

on the previous system. Not sure if is was a transcribing error, but in
your previous post you had:

Chown -R postgres: postgres /var/lib/pgsql/9.6/data

which would not work.

>
> Is it empty, because before it was not?
> It's strange the date folder, old is there with the data!

Just to be clear we are talking about the data/ directory.

Could we see the listings for data/ data_old?

>

--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Edson Lidorio 2017-04-21 21:13:21 Re: Recover PostgreSQL database folder data
Previous Message Edson Lidorio 2017-04-21 20:53:27 Re: Recover PostgreSQL database folder data