Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQ7QG-00077S-1X for pgsql-general@arkaria.postgresql.org; Mon, 13 May 2019 09:39:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hQ7QE-0005ji-O5 for pgsql-general@arkaria.postgresql.org; Mon, 13 May 2019 09:39:02 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQ7QE-0005ja-Co for pgsql-general@lists.postgresql.org; Mon, 13 May 2019 09:39:02 +0000 Received: from hermes.gatewaynet.com ([193.92.121.98]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hQ7QA-0005ro-U1 for pgsql-general@lists.postgresql.org; Mon, 13 May 2019 09:39:02 +0000 Received: from smadev.internal.net (pc131.internal.net [10.9.200.131]) by hermes.gatewaynet.com (8.15.2/8.15.2/Debian-8) with ESMTPS id x4D9co2P032667 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 13 May 2019 12:38:55 +0300 Received: from smadev.internal.net (smadev [10.9.200.131]) by smadev.internal.net (8.15.2/8.15.2) with ESMTP id x4D9coGM062945 for ; Mon, 13 May 2019 12:38:50 +0300 (EEST) (envelope-from achill@matrix.gatewaynet.com) Subject: Re: perl path issue To: pgsql-general@lists.postgresql.org References: <946d2c1f-cbf1-ecfa-7ee1-925d1de6d7a5@aklaver.com> <4e53d478-71b4-3359-78c2-1676c0cabe4d@pgmasters.net> <45abfa02-2cfd-b05c-f54e-41a770bbc4ea@aklaver.com> <2ae6795e-cc9a-83c8-3e7f-a8ce6eba6a28@aklaver.com> <58271ac5-78bb-cc8b-c034-ed7303b326e4@aklaver.com> <1e51499e-a684-66d8-b69e-0fa8777ab300@aklaver.com> <805b87a3-9849-7366-2e38-7dc63c8123c2@aklaver.com> From: Achilleas Mantzios Message-ID: <3cec0ea0-45e9-4e43-3106-06cd8e1cbfe4@matrix.gatewaynet.com> Date: Mon, 13 May 2019 12:38:50 +0300 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.3.2 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------B4ADE4B8AA56C302BBBEE6CB" Content-Language: en-US X-Virus-Scanned: clamav-milter 0.100.3 at hermes X-Virus-Status: Clean X-Spam-Status: No, score=-25.5 required=5.0 tests=ALL_TRUSTED,DYN_HAM_COORD, DYN_HAM_IT,DYN_HAM_NAUTICAL,DYN_HAM_SIGNAT1,DYN_SPAM_MED6,HTML_MESSAGE, TW_BD,TW_BP,TW_DB,TW_LR,TW_PG,TW_RW,TW_WX autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hermes.gatewaynet.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------B4ADE4B8AA56C302BBBEE6CB Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 13/5/19 12:20 μ.μ., Prakash Ramakrishnan wrote: > Hi Adrian, > > Yes am using edb standard edition and installed pgbackrest in prod and dev. > > nothing different am trying to restore the backup prod to dev cluster . > > * Can't load '/usr/lib64/perl5/vendor_perl/auto/DBD/Pg/Pg.so' for module DBD::Pg: libpq.so.5: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 190.* >         at /loader/0x1ec1528/pgBackRest/Db.pm line 10. >         at /loader/0x1ec1528/pgBackRest/Main.pm line 12. >         pgBackRest::Main::__ANON__('Can\'t load \'/usr/lib64/perl5/vendor_perl/auto/DBD/Pg/Pg.so\...') called at /usr/share/perl5/vendor_perl/Carp.pm line 100 How did you install libdbd-pg-perl ? There is a dependency from libdbd-pg-perl to libpq5 . > > May be above path is corrupt or something issue not able to load the path. > > Regards, > Prakash.R > > > On Sat, May 11, 2019 at 7:18 PM Adrian Klaver > wrote: > > On 5/10/19 6:49 PM, Prakash Ramakrishnan wrote: > > Hi Adrian, > > If I am following the below correctly you have EDB Postgres and > pgBackRest running together on the prod server, correct? > > If so what was done different/is different on the dev server? > > > > > 1) How was the production Postgres installed(EDB, native packages) and > > on what OS? > > > > prod has been installed edb standard edition .run file and os CENTOS 7.5 > > > > 2) The dev Postgres is the one installed using EDB installer, correct? > > > > yes > > > > 3) Define working fine. In other words where you/are you using a backup > > method other then pgBackRest on the production and dev server? > > > > Please find prod config file and backup details, > > > > ==> cat /etc/pgbackrest.conf > > [global] > > repo1-path=/pgBACKUP/A4_sydcosafpp001 > > retention-diff=3 > > retention-full=1 > > retention-archive=2 > > start-fast=y > > process-max=12 > > archive-async=y > > > > > > [global:archive-push] > > process-max=4 > > > > [A4_sydcosafpp001] > > pg1-path=/Postgres/pgDATA/data > > postgres@sydcosafpp001.enterprisenet.org:/home/postgres > > ==> cd /pgBACKUP/A4_sydcosafpp001/ > > archive/ backup/ > > postgres@sydcosafpp001.enterprisenet.org:/home/postgres > > ==> cd /pgBACKUP/A4_sydcosafpp001/backup/A4_sydcosafpp001/ > > postgres@sydcosafpp001.enterprisenet.org:/pgBACKUP/A4_sydcosafpp001/backup/A4_sydcosafpp001 > > ==> ls -lrth > > total 114K > > drwxr-x---. 4 postgres postgres   44 Jan  7 01:08 backup.history > > drwxr-x---. 3 postgres postgres   96 May  4 21:30 20190504-190001F > > drwxr-x---. 3 postgres postgres   96 May  5 19:41 > > 20190504-190001F_20190505-190002I > > drwxr-x---. 3 postgres postgres   96 May  6 20:28 > > 20190504-190001F_20190506-190002I > > drwxr-x---. 3 postgres postgres   96 May  7 20:26 > > 20190504-190001F_20190507-190004I > > drwxr-x---. 3 postgres postgres   96 May  8 20:28 > > 20190504-190001F_20190508-190002I > > drwxr-x---. 3 postgres postgres   96 May  9 20:32 > > 20190504-190001F_20190509-190001I > > drwxr-x---. 3 postgres postgres   96 May 10 20:32 > > 20190504-190001F_20190510-190001I > > lrwxrwxrwx. 1 postgres postgres   33 May 10 20:32 latest -> > > 20190504-190001F_20190510-190001I > > -rw-r-----. 1 postgres postgres 5.7K May 10 20:32 backup.info > > > > -rw-r-----. 1 postgres postgres 5.7K May 10 20:32 backup.info.copy > > > > > > > > 4) When you say single database are you talking about a particular > > database in the Postgres cluster or the entire cluster? > > > > we need restore for single database for single cluster. > > > > 5) Why is pgBackRest essential to this? In other words why not use the > > Postgres pg_dump/pg_restore tools? > > > > pgbackrest tool need for backup and restore larger databases. > > if suppose am using pg_dump and restore they wont accept it and taking > > too much time using parallel option also so we use for pgbackrest. > > > > > > On Fri, May 10, 2019 at 9:44 PM Adrian Klaver > > >> wrote: > > > >     On 5/10/19 7:50 AM, Prakash Ramakrishnan wrote: > >      > Hi Adrian, > >      > > >      > Production backup working fine now and previously dev server also > >      > working fine. > >      > > >      > Now the business team wants to restore the single database using > >      > pgbackrest tool so we have setup the pgbackrest.conf file is like to > >      > point prod . > > > > > >     The above is not much to go on. So a list of questions below. Please > >     answer them all, thanks: > > > >     1) How was the production Postgres installed(EDB, native packages) and > >     on what OS? > > > >     2) The dev Postgres is the one installed using EDB installer, correct? > > > >     3) Define working fine. In other words where you/are you using a backup > >     method other then pgBackRest on the production and dev server? > > > >     4) When you say single database are you talking about a particular > >     database in the Postgres cluster or the entire cluster? > > > >     5) Why is pgBackRest essential to this? In other words why not use the > >     Postgres pg_dump/pg_restore tools? > > > > > >     As to below, this more then a Perl issue it is a package > >     incompatibility > >     issue. > > > > > >      > > >      > and directly  restore the backup from prod so thats why not able > >     to do > >      > some perl issue . > >      > > >      > database size is huge so they giving pressure and below is the > >     config file, > >      > > >      > ==> cat /etc/pgbackrest.conf > >      > #[global] > >      > #repo1-path=/Postgres/pgBACKUP/A4_sydcosausd001 > >      > #retention-diff=4 > >      > #retention-full=4 > >      > #retention-archive=2 > >      > #start-fast=y > >      > #process-max=4 > >      > #archive-async=y > >      > > >      > > >      > #[global:archive-push] > >      > #process-max=4 > >      > > >      > #[A4_sydcosausd001] > >      > #db-path=/Postgres/pgDATA/data > >      > > >      > * > >      > * > >      > *[global]* > >      > *repo1-host=sydcosafpp001.enterprisenet.org > >      > >      > * > >      > *repo1-host-user=postgres* > >      > *repo1-host-config=/etc/pgbackrest.conf* > >      > *repo1-path=/pgBACKUP/A4_sydcosafpp001/backup/A4_sydcosafpp001* > >      > * > >      > * > >      > *[A4_sydcosafpp001]* > >      > *pg1-path=/Postgres/prakash_pgbackrest* > >      > postgres@sydcosausd001.enterprisenet.org:/home/postgres > >      > > >      > > >      > > >      > On Fri, May 10, 2019 at 8:15 PM Adrian Klaver > >      > > >      > > >     >>> wrote: > >      > > >      >     On 5/10/19 7:36 AM, Prakash Ramakrishnan wrote: > >      >      > Hi Adrian, > >      >      > > >      >      > I did the installation for like , > >      >      > > >      >      > postgresql-10.4-1-linux-x64.run file. > >      >      > > >      >      > pgbackrest - yum install > >      >      > > >      > > > https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rp > >      > > >      >      > > >      > > >       m > >      >      > > >      >      > > >      >      > yum install pgbackrest > >      > > >      >     As explained upstream that is not going to work. The package > >     YUM is > >      >     installing is assuming that it will be working with Postgres > >     installed > >      >     from packages in the same repo. That is not the case. You > >     might be able > >      >     to download the pgBackrest source and build it pointing at > >     the Perl in > >      >     the EDB install, but I have no idea how to make that happen. > >      >      > > >      >      > > >      >      > now what is the problem means we have to trying restore the > >      >     backup prod > >      >      > to dev server. > >      >      > > >      > > >      >     So was the prod backup taken with pgBackRest? > >      > > >      >     -- > >      >     Adrian Klaver > >      > adrian.klaver@aklaver.com > > >      >> > >      > > >      > > >      > > >      > -- > >      > > >      > > >      > > >      > Thanks, > >      > Prakash.R > >      > PostgreSQL - Offshore DBA support TCS / Nielsen Infrastructure > >     Team On > >      > call : +91-8939599426 > > > > > >     -- > >     Adrian Klaver > > adrian.klaver@aklaver.com > > > > > > > > > -- > > > > > > > > Thanks, > > Prakash.R > > PostgreSQL - Offshore DBA support TCS / Nielsen Infrastructure Team On > > call : +91-8939599426 > > > -- > Adrian Klaver > adrian.klaver@aklaver.com > > > > -- > > > > Thanks, > Prakash.R > PostgreSQL - Offshore DBA support TCS / Nielsen Infrastructure Team On call : +91-8939599426 -- Achilleas Mantzios IT DEV Lead IT DEPT Dynacom Tankers Mgmt --------------B4ADE4B8AA56C302BBBEE6CB Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 13/5/19 12:20 μ.μ., Prakash Ramakrishnan wrote:
Hi Adrian,

Yes am using edb standard edition and installed pgbackrest in prod and dev.

nothing different am trying to restore the backup prod to dev cluster .

       Can't load '/usr/lib64/perl5/vendor_perl/auto/DBD/Pg/Pg.so' for module DBD::Pg: libpq.so.5: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 190.
        at /loader/0x1ec1528/pgBackRest/Db.pm line 10.
        at /loader/0x1ec1528/pgBackRest/Main.pm line 12.
        pgBackRest::Main::__ANON__('Can\'t load \'/usr/lib64/perl5/vendor_perl/auto/DBD/Pg/Pg.so\...') called at /usr/share/perl5/vendor_perl/Carp.pm line 100

How did you install libdbd-pg-perl ?
There is a dependency from libdbd-pg-perl to libpq5 .


May be above path is corrupt or something issue not able to load the path.

Regards,
Prakash.R


On Sat, May 11, 2019 at 7:18 PM Adrian Klaver <adrian.klaver@aklaver.com> wrote:
On 5/10/19 6:49 PM, Prakash Ramakrishnan wrote:
> Hi Adrian,

If I am following the below correctly you have EDB Postgres and
pgBackRest running together on the prod server, correct?

If so what was done different/is different on the dev server?

>
> 1) How was the production Postgres installed(EDB, native packages) and
> on what OS?
>
> prod has been installed edb standard edition .run file and os CENTOS 7.5
>
> 2) The dev Postgres is the one installed using EDB installer, correct?
>
> yes
>
> 3) Define working fine. In other words where you/are you using a backup
> method other then pgBackRest on the production and dev server?
>
> Please find prod config file and backup details,
>
> ==> cat /etc/pgbackrest.conf
> [global]
> repo1-path=/pgBACKUP/A4_sydcosafpp001
> retention-diff=3
> retention-full=1
> retention-archive=2
> start-fast=y
> process-max=12
> archive-async=y
>
>
> [global:archive-push]
> process-max=4
>
> [A4_sydcosafpp001]
> pg1-path=/Postgres/pgDATA/data
> postgres@sydcosafpp001.enterprisenet.org:/home/postgres
> ==> cd /pgBACKUP/A4_sydcosafpp001/
> archive/ backup/
> postgres@sydcosafpp001.enterprisenet.org:/home/postgres
> ==> cd /pgBACKUP/A4_sydcosafpp001/backup/A4_sydcosafpp001/
> postgres@sydcosafpp001.enterprisenet.org:/pgBACKUP/A4_sydcosafpp001/backup/A4_sydcosafpp001
> ==> ls -lrth
> total 114K
> drwxr-x---. 4 postgres postgres   44 Jan  7 01:08 backup.history
> drwxr-x---. 3 postgres postgres   96 May  4 21:30 20190504-190001F
> drwxr-x---. 3 postgres postgres   96 May  5 19:41
> 20190504-190001F_20190505-190002I
> drwxr-x---. 3 postgres postgres   96 May  6 20:28
> 20190504-190001F_20190506-190002I
> drwxr-x---. 3 postgres postgres   96 May  7 20:26
> 20190504-190001F_20190507-190004I
> drwxr-x---. 3 postgres postgres   96 May  8 20:28
> 20190504-190001F_20190508-190002I
> drwxr-x---. 3 postgres postgres   96 May  9 20:32
> 20190504-190001F_20190509-190001I
> drwxr-x---. 3 postgres postgres   96 May 10 20:32
> 20190504-190001F_20190510-190001I
> lrwxrwxrwx. 1 postgres postgres   33 May 10 20:32 latest ->
> 20190504-190001F_20190510-190001I
> -rw-r-----. 1 postgres postgres 5.7K May 10 20:32 backup.info
> <http://backup.info>
> -rw-r-----. 1 postgres postgres 5.7K May 10 20:32 backup.info.copy
>
>
>
> 4) When you say single database are you talking about a particular
> database in the Postgres cluster or the entire cluster?
>
> we need restore for single database for single cluster.
>
> 5) Why is pgBackRest essential to this? In other words why not use the
> Postgres pg_dump/pg_restore tools?
>
> pgbackrest tool need for backup and restore larger databases.
> if suppose am using pg_dump and restore they wont accept it and taking
> too much time using parallel option also so we use for pgbackrest.
>
>
> On Fri, May 10, 2019 at 9:44 PM Adrian Klaver <adrian.klaver@aklaver.com
> <mailto:adrian.klaver@aklaver.com>> wrote:
>
>     On 5/10/19 7:50 AM, Prakash Ramakrishnan wrote:
>      > Hi Adrian,
>      >
>      > Production backup working fine now and previously dev server also
>      > working fine.
>      >
>      > Now the business team wants to restore the single database using
>      > pgbackrest tool so we have setup the pgbackrest.conf file is like to
>      > point prod .
>
>
>     The above is not much to go on. So a list of questions below. Please
>     answer them all, thanks:
>
>     1) How was the production Postgres installed(EDB, native packages) and
>     on what OS?
>
>     2) The dev Postgres is the one installed using EDB installer, correct?
>
>     3) Define working fine. In other words where you/are you using a backup
>     method other then pgBackRest on the production and dev server?
>
>     4) When you say single database are you talking about a particular
>     database in the Postgres cluster or the entire cluster?
>
>     5) Why is pgBackRest essential to this? In other words why not use the
>     Postgres pg_dump/pg_restore tools?
>
>
>     As to below, this more then a Perl issue it is a package
>     incompatibility
>     issue.
>
>
>      >
>      > and directly  restore the backup from prod so thats why not able
>     to do
>      > some perl issue .
>      >
>      > database size is huge so they giving pressure and below is the
>     config file,
>      >
>      > ==> cat /etc/pgbackrest.conf
>      > #[global]
>      > #repo1-path=/Postgres/pgBACKUP/A4_sydcosausd001
>      > #retention-diff=4
>      > #retention-full=4
>      > #retention-archive=2
>      > #start-fast=y
>      > #process-max=4
>      > #archive-async=y
>      >
>      >
>      > #[global:archive-push]
>      > #process-max=4
>      >
>      > #[A4_sydcosausd001]
>      > #db-path=/Postgres/pgDATA/data
>      >
>      > *
>      > *
>      > *[global]*
>      > *repo1-host=sydcosafpp001.enterprisenet.org
>     <http://sydcosafpp001.enterprisenet.org>
>      > <http://sydcosafpp001.enterprisenet.org>*
>      > *repo1-host-user=postgres*
>      > *repo1-host-config=/etc/pgbackrest.conf*
>      > *repo1-path=/pgBACKUP/A4_sydcosafpp001/backup/A4_sydcosafpp001*
>      > *
>      > *
>      > *[A4_sydcosafpp001]*
>      > *pg1-path=/Postgres/prakash_pgbackrest*
>      > postgres@sydcosausd001.enterprisenet.org:/home/postgres
>      >
>      >
>      >
>      > On Fri, May 10, 2019 at 8:15 PM Adrian Klaver
>     <adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>      > <mailto:adrian.klaver@aklaver.com
>     <mailto:adrian.klaver@aklaver.com>>> wrote:
>      >
>      >     On 5/10/19 7:36 AM, Prakash Ramakrishnan wrote:
>      >      > Hi Adrian,
>      >      >
>      >      > I did the installation for like ,
>      >      >
>      >      > postgresql-10.4-1-linux-x64.run file.
>      >      >
>      >      > pgbackrest - yum install
>      >      >
>      >
>     https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rp
>      >
>      >      >
>      >   
>       <https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-7-x86_64/pgdg-redhat96-9.6-3.noarch.rpm>m
>      >      >
>      >      >
>      >      > yum install pgbackrest
>      >
>      >     As explained upstream that is not going to work. The package
>     YUM is
>      >     installing is assuming that it will be working with Postgres
>     installed
>      >     from packages in the same repo. That is not the case. You
>     might be able
>      >     to download the pgBackrest source and build it pointing at
>     the Perl in
>      >     the EDB install, but I have no idea how to make that happen.
>      >      >
>      >      >
>      >      > now what is the problem means we have to trying restore the
>      >     backup prod
>      >      > to dev server.
>      >      >
>      >
>      >     So was the prod backup taken with pgBackRest?
>      >
>      >     --
>      >     Adrian Klaver
>      > adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>     <mailto:adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>>
>      >
>      >
>      >
>      > --
>      >
>      >
>      >
>      > Thanks,
>      > Prakash.R
>      > PostgreSQL - Offshore DBA support TCS / Nielsen Infrastructure
>     Team On
>      > call : +91-8939599426
>
>
>     --
>     Adrian Klaver
>     adrian.klaver@aklaver.com <mailto:adrian.klaver@aklaver.com>
>
>
>
> --
>
>
>
> Thanks,
> Prakash.R
> PostgreSQL - Offshore DBA support TCS / Nielsen Infrastructure Team On
> call : +91-8939599426


--
Adrian Klaver
adrian.klaver@aklaver.com


--



Thanks,
Prakash.R
PostgreSQL - Offshore DBA support TCS / Nielsen Infrastructure Team On call : +91-8939599426


-- 
Achilleas Mantzios
IT DEV Lead
IT DEPT
Dynacom Tankers Mgmt
--------------B4ADE4B8AA56C302BBBEE6CB--