David am trying to restore the backup in dev server please find the below details ,
[root@sydcosausd001 ~]# yum install perl perl-Time-HiRes perl-Digest-SHA perl-DBD-Pg perl-JSON-PP
Loaded plugins: fastestmirror, product-id, search-disabled-repos, subscription-manager
Determining fastest mirrors
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
tnc_TNC_Nielsen_tnc_nielsen_rpms | 2.1 kB 00:00:00
(1/23): pgdg94/7/x86_64/primary_db | 236 kB 00:00:02
(2/23): pgdg10/7/x86_64/primary_db | 204 kB 00:00:02
(3/23): pgdg11/7/x86_64/primary_db | 166 kB 00:00:02
(4/23): pgdg96/7/x86_64/primary_db | 225 kB 00:00:02
(5/23): pgdg95/7/x86_64/primary_db | 227 kB 00:00:03
(6/23): tnc_CentOS-Katello-Client_CentOS-Katello-Client/updateinfo | 93 B 00:00:02
(7/23): tnc_CentOS-Katello-Client_CentOS-Katello-Client/primary | 4.6 kB 00:00:02
(8/23): tnc_CentOS_extras_x86_64/updateinfo | 93 B 00:00:02
(9/23): tnc_CentOS_extras_x86_64/primary | 127 kB 00:00:02
(10/23): tnc_CentOS_os_x86_64/updateinfo | 93 B 00:00:01
(11/23): tnc_CentOS_os_x86_64/group | 573 kB 00:00:03
(12/23): tnc_CentOS_sclo_x86_64_sclo/updateinfo | 93 B 00:00:02
(13/23): tnc_CentOS_sclo_x86_64_rh/updateinfo | 93 B 00:00:02
(14/23): tnc_CentOS_sclo_x86_64_sclo/primary | 203 kB 00:00:02
(15/23): tnc_CentOS_os_x86_64/primary | 3.9 MB 00:00:03
(16/23): tnc_CentOS_updates_x86_64/updateinfo | 93 B 00:00:01
(17/23): tnc_CentOS_sclo_x86_64_rh/primary | 2.6 MB 00:00:04
(18/23): tnc_CentOS_updates_x86_64/primary | 2.0 MB 00:00:04
(19/23): tnc_Extra_Packages_for_Enterprise_Linux_7_Extra_Packages_for_Enterprise_Linux_7/updateinfo | 1.6 MB 00:00:03
(20/23): tnc_TNC_Nielsen_tnc_nielsen_rpms/updateinfo | 93 B 00:00:02
(21/23): tnc_TNC_Nielsen_tnc_nielsen_rpms/primary | 13 kB 00:00:02
(22/23): tnc_Extra_Packages_for_Enterprise_Linux_7_Extra_Packages_for_Enterprise_Linux_7/group | 1.2 MB 00:00:07
(23/23): tnc_Extra_Packages_for_Enterprise_Linux_7_Extra_Packages_for_Enterprise_Linux_7/primary | 14 MB 00:00:08
tnc_CentOS-Katello-Client_CentOS-Katello-Client 16/16
tnc_CentOS_extras_x86_64 385/385
tnc_CentOS_os_x86_64 10019/10019
tnc_CentOS_sclo_x86_64_rh 8113/8113
tnc_CentOS_sclo_x86_64_sclo 756/756
tnc_CentOS_updates_x86_64 1511/1511
tnc_Extra_Packages_for_Enterprise_Linux_7_Extra_Packages_for_Enterprise_Linux_7 39852/39852
tnc_TNC_Nielsen_tnc_nielsen_rpms 48/48
Package 4:perl-Time-HiRes-1.9725-3.el7.x86_64 already installed and latest version
Package 1:perl-Digest-SHA-5.85-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
Package perl-JSON-PP-2.27202-2.el7.noarch already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package perl.x86_64 4:5.16.3-292.el7 will be updated
---> Package perl.x86_64 4:5.16.3-294.el7_6 will be an update
--> Processing Dependency: perl-libs = 4:5.16.3-294.el7_6 for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Running transaction check
---> Package perl-libs.x86_64 4:5.16.3-292.el7 will be updated
---> Package perl-libs.x86_64 4:5.16.3-294.el7_6 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
=============================================================================================================================================================
Package Arch Version Repository Size
=============================================================================================================================================================
Updating:
perl x86_64 4:5.16.3-294.el7_6 tnc_CentOS_updates_x86_64 8.0 M
Updating for dependencies:
perl-libs x86_64 4:5.16.3-294.el7_6 tnc_CentOS_updates_x86_64 688 k
Transaction Summary
=============================================================================================================================================================
Upgrade 1 Package (+1 Dependent package)
Total download size: 8.6 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/2): perl-libs-5.16.3-294.el7_6.x86_64.rpm | 688 kB 00:00:03
(2/2): perl-5.16.3-294.el7_6.x86_64.rpm | 8.0 MB 00:00:06
-------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 1.4 MB/s | 8.6 MB 00:00:06
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : 4:perl-libs-5.16.3-294.el7_6.x86_64 1/4
Updating : 4:perl-5.16.3-294.el7_6.x86_64 2/4
Cleanup : 4:perl-5.16.3-292.el7.x86_64 3/4
Cleanup : 4:perl-libs-5.16.3-292.el7.x86_64 4/4
Verifying : 4:perl-libs-5.16.3-294.el7_6.x86_64 1/4
Verifying : 4:perl-5.16.3-294.el7_6.x86_64 2/4
Verifying : 4:perl-5.16.3-292.el7.x86_64 3/4
Verifying : 4:perl-libs-5.16.3-292.el7.x86_64 4/4
Updated:
perl.x86_64 4:5.16.3-294.el7_6
Dependency Updated:
perl-libs.x86_64 4:5.16.3-294.el7_6
Complete!
[root@sydcosausd001 ~]# exit
logout
postgres@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:/var/log/pgbackrest
==> 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-10 00:56:22.585 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/0x172c528/pgBackRest/Db.pm line 10.
at /loader/0x172c528/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(0x20a3a68)') called at /usr/lib64/perl5/vendor_perl/DBD/Pg.pm line 73
require DBD/Pg.pm called at /loader/0x172c528/pgBackRest/Db.pm line 10
pgBackRest::Db::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/0x172c528/pgBackRest/Archive/Common.pm line 16
pgBackRest::Archive::Common::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/Archive/Common.pm called at /loader/0x172c528/pgBackRest/Archive/Get/File.pm line 15
pgBackRest::Archive::Get::File::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/Archive/Get/File.pm called at /loader/0x172c528/pgBackRest/Protocol/Remote/Minion.pm line 17
pgBackRest::Protocol::Remote::Minion::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/Protocol/Remote/Minion.pm called at /loader/0x172c528/pgBackRest/Main.pm line 118
eval {...} called at /loader/0x172c528/pgBackRest/Main.pm line 286
pgBackRest::Main::main('remote') called at (eval 269) line 1
eval '($iResult, $bErrorC, $strMessage) = pgBackRest::Main::main(\'remote\')
;' called at /usr/lib64/perl5/vendor_perl/DBD/Pg.pm line 0
Compilation failed in require at /loader/0x172c528/pgBackRest/Db.pm line 10.
at /loader/0x172c528/pgBackRest/Main.pm line 12.
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::Db::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@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:/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