LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-13-2019, 10:20 AM   #1
prakashtcs30
LQ Newbie
 
Registered: May 2019
Posts: 3

Rep: Reputation: Disabled
perl issue


Hi Team,

We had an issue with restore please find the details,need some help

Please find the below details,

pgBackRest version:
pgBackRest 2.13 - General help

PostgreSQL version:
PostgreSQL 10.4

Operating system/version - CentOS Linux release 7.5.1804 (Core)

Did you install pgBackRest from source or from a package?

yes

Please attach the following as applicable:
pgbackrest.conf file(s)
==> 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

- `postgresql.conf` settings applicable to pgBackRest (`archive_command`, `archive_mode`, `listen_addresses`, `max_wal_senders`, `wal_level`, `port`)


postgres=# show port;
port
5432
(1 row)

postgres=# show archive_command ;
archive_command
export LD_LIBRARY_PATH=/usr/lib64/perl5/CORE:${LD_LIBRARY_PATH};pgbackrest --stanza=A4_sydcosausd001 archive-push %p
(1 row)

postgres=# show archive_mode;
archive_mode
on
(1 row)

postgres=# show listen_addresses ;
listen_addresses
10.228.13.46
(1 row)

postgres=# show max_wal_senders ;
max_wal_senders
3
(1 row)

postgres=# show wal_level ;
wal_level
replica
(1 row)

- log file in `/var/log/pgbackrest` for the commands run (e.g. `/var/log/pgbackrest/mystanza_backup.log`)

==> pgbackrest --stanza=A4_sydcosafpp001 --log-level-console=info --db-path=/Postgres/prakash_pgbackrest --process-max=2 --db-include=A4_Copy restore --repo1-path=/pgBACKUP/A4_sydcosafpp001/backup/A4_sydcosafpp001
2019-05-08 18:31:15.511 P00 INFO: restore command begin 2.13: --db-include=A4_Copy --log-level-console=info --pg1-path=/Postgres/prakash_pgbackrest --process-max=2 --repo1-host=sydcosafpp001.enterprisenet.org --repo1-host-config=/etc/pgbackrest.conf --repo1-host-user=postgres --repo1-path=/pgBACKUP/A4_sydcosafpp001/backup/A4_sydcosafpp001 --stanza=A4_sydcosafpp001
Password:
ERROR [124]: : remote process on 'sydcosafpp001.enterprisenet.org' terminated unexpectedly [124]: ERROR: [124]: process terminated due to an unhandled exception:
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/0x23c3528/pgBackRest/Db.pm line 10.
at /loader/0x23c3528/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
Carp::croak('Can't load '/usr/lib64/perl5/vendor_perl/auto/DBD/Pg/Pg.so...') called at /usr/lib64/perl5/DynaLoader.pm line 98
DynaLoader::croak('Can't load '/usr/lib64/perl5/vendor_perl/auto/DBD/Pg/Pg.so...') called at /usr/lib64/perl5/DynaLoader.pm line 190
DynaLoader::bootstrap('DBD::Pg', 'version=HASH(0x2d3aa68)') called at /usr/lib64/perl5/vendor_perl/DBD/Pg.pm line 73
require DBD/Pg.pm called at /loader/0x23c3528/pgBackRest/Db.pm line 10
pgBackRest:b::BEGIN() called at /usr/lib64/perl5/vendor_perl/DBD/Pg.pm line 0
eval {...} called at /usr/lib64/perl5/vendor_perl/DBD/Pg.pm line 0
require pgBackRest/Db.pm called at /loader/0x23c3528/pgBackRest/Archive/Common.pm line 16
pgBackRest::Archive::Common::BEGIN() called at /usr/lib64/perl5/vendor_perl/DBD/Pg.pm line 0

Describe the issue:
Hi Team,

we have trying to do restore the backup from source is production and target is dev server and while during above pg_backrest restore command getting below error,
This is some high priority issue please do the needful and we have perl path and files and not able load the files,

ERROR [124]: : remote process on 'sydcosafpp001.enterprisenet.org' terminated unexpectedly [124]: ERROR: [124]: process terminated due to an unhandled exception:
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/0x23c3528/pgBackRest/Db.pm line 10.

==> pwd
/usr/lib64/perl5
postgres@sydcosausd001.enterprisenet.org:/usr/lib64/perl5
==> ls
arybase.pm bits CORE Fcntl.pm _h2ph_pre.ph lib.pm NDBM_File.pm perllocal.pod stdarg.ph syslimits.ph Unicode
asm B.pm Devel features.ph Hash linux ODBM_File.pm POSIX.pm stdc-predef.ph syslog.ph vendor_perl
asm-generic Config_git.pl Digest File I18N machine Opcode.pm POSIX.pod stddef.ph Text wait.ph
attributes.pm Config_heavy.pl DynaLoader.pm Filter IO Math O.pm re.pm sys Tie xlocale.ph
auto Config.pm endian.ph GDBM_File.pm IO.pm MIME ops.pm SDBM_File.pm Sys Time
B Config.pod Errno.pm gnu IPC mro.pm PerlIO signal.ph syscall.ph time.ph

more A4_sydcosafpp001-restore.log

2019-05-02 14:50:00.028 P00 INFO: restore command begin 2.10: --log-level-console=detail --pg1-path=/pgDATA/datanew --repo1-host=sydcosafpp001.enterprisene
t.org --repo1-host-config=/etc/pgbackrest.conf --repo1-host-user=postgres --repo1-path=/pgBACKUP/A4_sydcosafpp001 --stanza=A4_sydcosafpp001 --target="2019-05
-01 10:58:18.000000+01" --type=time
2019-05-02 14:50:07.930 P00 ERROR: [124]: remote process on 'sydcosafpp001.enterprisenet.org' terminated unexpectedly [124]: ERROR: [124]: process terminate
d due to an unhandled exception:
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/0x1623548/pgBackRest/Db.pm line 10.
at /loader/0x1623548/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
Carp::croak('Can't load '/usr/lib64/perl5/vendor_perl/auto/DBD/Pg/Pg.so...') called at /usr/lib64/perl5/Dy
naLoader.pm line 98
DynaLoader::croak('Can't load '/usr/lib64/perl5/vendor_perl/auto/DBD/Pg/Pg.so...') called at /usr/lib64/pe
rl5/DynaLoader.pm line 190
DynaLoader::bootstrap('DBD::Pg', 'version=HASH(0x1f9a938)') called at /usr/lib64/perl5/vendor_perl/DBD/Pg.pm
line 73
 
Old 05-13-2019, 10:26 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
looks like DBD::Pg is not properly installed/configured. or something similar.
 
Old 05-13-2019, 10:29 AM   #3
prakashtcs30
LQ Newbie
 
Registered: May 2019
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi Pan64,

Can you please tell me the correct method for dbd pg .

[root@sydcosausd001 ~]# yum -y install perl-DBI perl-DBD-Pg
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager
Loading mirror speeds from cached hostfile
pgdg10 | 4.1 kB 00:00:00
pgdg11 | 4.1 kB 00:00:00
pgdg94 | 4.1 kB 00:00:00
pgdg95 | 4.1 kB 00:00:00
pgdg96 | 4.1 kB 00:00:00
tnc_CentOS-Katello-Client_CentOS-Katello-Client | 2.1 kB 00:00:00
tnc_CentOS_extras_x86_64 | 2.1 kB 00:00:00
tnc_CentOS_os_x86_64 | 2.1 kB 00:00:00
tnc_CentOS_sclo_x86_64_rh | 2.1 kB 00:00:00
tnc_CentOS_sclo_x86_64_sclo | 2.1 kB 00:00:00
tnc_CentOS_updates_x86_64 | 2.1 kB 00:00:00
tnc_Extra_Packages_for_Enterprise_Linux_7_Extra_Packages_for_Enterprise_Linux_7 | 2.1 kB 00:00:00 | 2.1 kB 00:00:00
Package perl-DBI-1.627-4.el7.x86_64 already installed and latest version
Package perl-DBD-Pg-2.19.3-4.el7.x86_64 already installed and latest version
Nothing to do
 
Old 05-13-2019, 07:47 PM   #4
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Googling for the missing shared library yielded a few results, including this Github issue.

The missing shared library should be in perl-DBD-Pg-2.19.3-4.el7.x86_64.rpm. Perhaps it was removed from your system by mistake? Have you even checked if this file exists, and if not, tried to reinstall the rpm?

By the way, instead of copypasting your unformatted support case into a forum, you could add a little summary of the problem, document what you have tried so far, and at least use formatting to make it easier to read. More people might be inclined to read it, and it would be easier not to miss details.

Last edited by berndbausch; 05-13-2019 at 07:51 PM. Reason: added rant about dumping a wall of text onto Linuxquestions
 
Old 05-14-2019, 04:20 AM   #5
prakashtcs30
LQ Newbie
 
Registered: May 2019
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi Team,

We tried to install missing rpms getting same error.

[root@sydcosausd001 postgres]# rpm -ivh perl-DBD-Pg-2.19.3-4.el7.x86_64.rpm
Preparing... ################################# [100%]
package perl-DBD-Pg-2.19.3-4.el7.x86_64 is already installed
[root@sydcosausd001 postgres]#
[root@sydcosausd001 postgres]# exit
logout
postgres@sydcosausd001.enterprisenet.org:/home/postgres

Please find the below details,

==> pgbackrest --stanza=A4_sydcosafpp001 --log-level-console=info --db-path=/Postgres/prakash_pgbackrest --delta --process-max=2 --db-include=A4_Copy restore --repo1-path=/pgBACKUP/A4_sydcosafpp001/backup/A4_sydcosafpp001
2019-05-14 19:18:34.128 P00 INFO: restore command begin 2.13: --db-include=A4_Copy --delta --log-level-console=info --pg1-path=/Postgres/prakash_pgbackrest --process-max=2 --repo1-host=sydcosafpp001.enterprisenet.org --repo1-host-config=/etc/pgbackrest.conf --repo1-host-user=postgres --repo1-path=/pgBACKUP/A4_sydcosafpp001/backup/A4_sydcosafpp001 --stanza=A4_sydcosafpp001
Password:
ERROR [124]: : remote process on 'sydcosafpp001.enterprisenet.org' terminated unexpectedly [124]: ERROR: [124]: process terminated due to an unhandled exception:
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/0x12c2528/pgBackRest/Db.pm line 10.
at /loader/0x12c2528/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
 
Old 05-14-2019, 05:02 AM   #6
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by prakashtcs30 View Post
Hi Team,

We tried to install missing rpms getting same error.

[root@sydcosausd001 postgres]# rpm -ivh perl-DBD-Pg-2.19.3-4.el7.x86_64.rpm
Preparing... ################################# [100%]
package perl-DBD-Pg-2.19.3-4.el7.x86_64 is already installed
man rpm:
Code:
--replacepkgs
    Install the packages even if some of them are already installed on this system.
Also, have you checked if this missing shared library is really missing?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Plain Old Documentation (pod) – write documentation for Perl, Perl software, and Perl modules LXer Syndicated Linux News 0 10-05-2018 09:12 AM
Perl datescript Issue, missing perl module? stefaandk Programming 5 02-19-2006 10:55 PM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 08:09 PM
can i set ~/public_html/perl as a perl directory for apache? doublefailure Linux - Networking 1 07-09-2002 04:31 PM
Including methods from a perl script into another perl script gene_gEnie Programming 3 01-31-2002 05:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration