Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-24 Thread Christofer C. Bell
On Sat, Apr 22, 2017 at 9:11 AM, Edson Lidorio wrote: > > > On 22-04-2017 06:40, Magnus Hagander wrote: > > > > On Sat, Apr 22, 2017 at 3:05 AM, Cat wrote: > >> On Fri, Apr 21, 2017 at 08:20:38PM -0300, Edson Lidorio wrote: >> > Ls -la

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-22 Thread Edson Lidorio
On 22-04-2017 06:40, Magnus Hagander wrote: On Sat, Apr 22, 2017 at 3:05 AM, Cat > wrote: On Fri, Apr 21, 2017 at 08:20:38PM -0300, Edson Lidorio wrote: > Ls -la /var/lib/pgsql/9.6/data > > drwx--. 20 postgres postgres 4096 Abr

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-22 Thread Magnus Hagander
On Sat, Apr 22, 2017 at 3:05 AM, Cat wrote: > On Fri, Apr 21, 2017 at 08:20:38PM -0300, Edson Lidorio wrote: > > Ls -la /var/lib/pgsql/9.6/data > > > > drwx--. 20 postgres postgres 4096 Abr 21 17:52 . > > drwx--. 4 root root51 Abr 21 06:33 .. > > Ensure

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Cat
On Fri, Apr 21, 2017 at 08:20:38PM -0300, Edson Lidorio wrote: > Ls -la /var/lib/pgsql/9.6/data > > drwx--. 20 postgres postgres 4096 Abr 21 17:52 . > drwx--. 4 root root51 Abr 21 06:33 .. Ensure that the user 'postgres' has permissions to get to this dir from / up. This

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Adrian Klaver
On 04/21/2017 04:20 PM, Edson Lidorio wrote: On 21-04-2017 18:13, Edson Lidorio wrote: On 21-04-2017 18:02, Adrian Klaver wrote: Chown -R postgres: postgres /var/lib/pgsql/9.6/data After the command, I have the errors: Apr 21 18:11:41 localhost postgresql96-check-db-dir:

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Edson Lidorio
On 21-04-2017 20:55, Adrian Klaver wrote: On 04/21/2017 04:20 PM, Edson Lidorio wrote: On 21-04-2017 18:13, Edson Lidorio wrote: What does the directory listing for /var/lib/pgsql/9.6/data show? [root@localhost data]# pwd /var/lib/pgsql/9.6/data Ls -la /var/lib/pgsql/9.6/data

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Adrian Klaver
On 04/21/2017 04:20 PM, Edson Lidorio wrote: On 21-04-2017 18:13, Edson Lidorio wrote: What does the directory listing for /var/lib/pgsql/9.6/data show? [root@localhost data]# pwd /var/lib/pgsql/9.6/data Ls -la /var/lib/pgsql/9.6/data drwx--. 20 postgres postgres 4096 Abr 21 17:52

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread David G. Johnston
On Friday, April 21, 2017, Edson Lidorio wrote: > > 4- I gave permission in the folder date: > sudo chown postgres: postgres /var/lib/pgsql/9.6/data; > sudo chmod 700 /var/lib/pgsql/9.6/data > You might want to check and see what permissions the original package

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Edson Lidorio
On 21-04-2017 18:13, Edson Lidorio wrote: On 21-04-2017 18:02, Adrian Klaver wrote: Chown -R postgres: postgres /var/lib/pgsql/9.6/data After the command, I have the errors: Apr 21 18:11:41 localhost postgresql96-check-db-dir: "/var/lib/pgsql/9.6/data/" is missing or empty. Apr 21

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Alan Hodgson
> On Fri, Apr 21, 2017 at 12:40 PM, Edson Lidorio > > wrote: > > Hi, > > There was a disaster in my development note. I was able to recover the > > data folder. PostgreSQL 9.6.2, was installed in Centos 7. > > > > Here are the procedures I'm trying to initialize

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread John R Pierce
On 4/21/2017 2:13 PM, Edson Lidorio wrote: Apr 21 18:11:41 localhost postgresql96-check-db-dir: "/var/lib/pgsql/9.6/data/" is missing or empty. whats there? ls -la /var/lib/pgsql/9.6/data -- john r pierce, recycling bits in santa cruz

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Adrian Klaver
On 04/21/2017 02:13 PM, Edson Lidorio wrote: On 21-04-2017 18:02, Adrian Klaver wrote: Chown -R postgres: postgres /var/lib/pgsql/9.6/data After the command, I have the errors: What does the directory listing for /var/lib/pgsql/9.6/data show? Apr 21 18:11:41 localhost

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Edson Lidorio
On 21-04-2017 18:02, Adrian Klaver wrote: Chown -R postgres: postgres /var/lib/pgsql/9.6/data After the command, I have the errors: Apr 21 18:11:41 localhost postgresql96-check-db-dir: "/var/lib/pgsql/9.6/data/" is missing or empty. Apr 21 18:11:41 localhost postgresql96-check-db-dir: Use

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Adrian Klaver
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

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Edson Lidorio
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

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Adrian Klaver
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

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Edson Lidorio
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 Erros: Unit postgresql-9.6.service entered failed state. Abr 21 07:50:11 localhost.localdomain systemd[1]:

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Adrian Klaver
On 04/21/2017 01:14 PM, Edson Lidorio wrote: On 21-04-2017 16:00, Adrian Klaver wrote: Is that really the case? Yes, I have already given permission on this folder and it does not initialize. You do not want to initialize the directory that was taken care of when you did: 3- I renamed

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Scott Mead
On Fri, Apr 21, 2017 at 12:40 PM, Edson Lidorio wrote: > Hi, > There was a disaster in my development note. I was able to recover the > data folder. PostgreSQL 9.6.2, was installed in Centos 7. > > Here are the procedures I'm trying to initialize Postgresql for me to do a

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread John R Pierce
On 4/21/2017 1:14 PM, Edson Lidorio wrote: On 21-04-2017 16:00, Adrian Klaver wrote: Is that really the case? Yes, I have already given permission on this folder and it does not initialize. I'll try to make another copy in another vm. who owns the files IN the folder? try chown -R

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Edson Lidorio
On 21-04-2017 16:00, Adrian Klaver wrote: Is that really the case? Yes, I have already given permission on this folder and it does not initialize. I'll try to make another copy in another vm. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread John R Pierce
On 4/21/2017 12:00 PM, Adrian Klaver wrote: Apr 21 04:01:48 localhost postgresql96-check-db-dir: cat: /var/lib/pgsql/9.6/data//PG_VERSION: Permissão negada So you got a permissions error when the script was trying to read PG_VERSION. The suspicious part is this:

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Adrian Klaver
On 04/21/2017 10:09 AM, Edson Lidorio wrote: On 21-04-2017 13:48, Adrian Klaver wrote: On 04/21/2017 09:40 AM, Edson Lidorio wrote: Hi, There was a disaster in my development note. I was able to recover the data folder. PostgreSQL 9.6.2, was installed in Centos 7. Here are the procedures

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Edson Lidorio
On 21-04-2017 13:48, Adrian Klaver wrote: On 04/21/2017 09:40 AM, Edson Lidorio wrote: Hi, There was a disaster in my development note. I was able to recover the data folder. PostgreSQL 9.6.2, was installed in Centos 7. Here are the procedures I'm trying to initialize Postgresql for me to do

Re: [GENERAL] Recover PostgreSQL database folder data

2017-04-21 Thread Adrian Klaver
On 04/21/2017 09:40 AM, Edson Lidorio wrote: Hi, There was a disaster in my development note. I was able to recover the data folder. PostgreSQL 9.6.2, was installed in Centos 7. Here are the procedures I'm trying to initialize Postgresql for me to do a backup. 1- I installed PostgreSQL 9.6.2