Обсуждение: pg_backrest build dependencies rpm's
Hello Experts,
where can I get pg_backrest build dependencies rpm's
I am using RHEL 7 and postgres as 10, 11.2 and 11.3
here is the note I do see from pgbackrest.org ,
When building from source it is best to use a build host rather than building on production. Many of the tools required for the build should generally not be installed in production. pgBackRest consists of a single executable so it is easy to copy to a new host once it is built.
build ⇒ Download version 2.14 of pgBackRest
sudo wget -q -O - \ https://github.com/pgbackrest/pgbackrest/archive/release/2.14.tar.gz | \ sudo tar zx -C /root
build ⇒ Install build dependencies
sudo apt-get install build-essential libssl-dev libxml2-dev libperl-dev zlib1g-dev
Thank you
--
--
Regards,
#! Pavan Kumar
-----------------------------------------------
Sr. Database Administrator..!
NEXT GENERATION PROFESSIONALS, LLC
Cell # 267-799-3182 # pavan.dba27 (Gtalk)
#! Pavan Kumar
-----------------------------------------------
Sr. Database Administrator..!
NEXT GENERATION PROFESSIONALS, LLC
Cell # 267-799-3182 # pavan.dba27 (Gtalk)
India # 9000459083
Take Risks; if you win, you will be very happy. If you lose you will be Wise
Hi Pavan, On 23/05/2019 16:53, Pavan Kumar wrote: > I am using RHEL 7 and postgres as 10, 11.2 and 11.3 > here is the note I do see from pgbackrest.org <http://pgbackrest.org> , Have you considered using the prepackaged version that can be found in the PGDG yum repository? It can be found here: https://yum.postgresql.org and the dependency resolution will be handled for you (Note, some of the packages might depend on the EPEL repository). Cheers, Jakub Olczyk
Вложения
Hi Pavan, I think you forgot to add the list to your reply, so I am adding it right now. On 23/05/2019 17:46, Pavan Kumar wrote: > I installed pgdg repository rpm. > > [root@katyayani ~]# rpm -Uvh pgdg-redhat-repo-latest.noarch.rpm > Preparing... ########################################### [100%] > 1:pgdg-redhat-repo ########################################### [100%] > > when i query for rpm's in the repository, i don't see the rpm i am looking for > [root@katyayani ~]# yum provides build > Loaded plugins: refresh-packagekit, security, ulninfo > Repository pgdg11 is listed more than once in the configuration > Repository pgdg96 is listed more than once in the configuration > Repository pgdg11-updates-testing is listed more than once in the configuration > Repository pgdg96-updates-testing is listed more than once in the configuration > Repository pgdg11-source is listed more than once in the configuration > Repository pgdg11-source-updates-testing is listed more than once in the configuration > Repository pgdg96-source is listed more than once in the configuration > Repository pgdg96-source-updates-testing is listed more than once in the configuration > pgdg94 | 4.1 kB 00:00 > pgdg94/primary_db | 238 kB 00:00 > pgdg95 | 4.1 kB 00:00 > pgdg95/primary_db | 242 kB 00:00 > Warning: 3.0.x versions of yum would erroneously match against filenames. > You can use "*/build" and/or "*bin/build" to get that behaviour > No Matches found > > Instead of configuring pgdg yum repository, is there any way to download rpm's from pgdg repository portal ? Well, I thought you might want to use the prepackaged version of pgbackrest from the repository that matches the version of PostgreSQL you have installed. So the command after installing the repository RPM would look like this: # yum install pgbackrest In that way you won't need to compile anything from scratch and you can count on the automated updates from the repository. If that approach isn't really working for you and you can only compile yourself the first step would be installing the @buildsys-build group which is roughly equivalent to build-essential from Debian world. As for other library packages I'd start with the ones that are listed as BuildRequires in the source RPM package from PGDG repository and later install anything that is still missing. So the command for installing packages required during build would be: # yum install @buildsys-build \ openssl-devel \ zlib-devel \ perl-ExtUtils-Embed Cheers, Jakub Olczyk
Вложения
On 5/24/19 3:16 AM, Jakub Olczyk wrote: >> >> Instead of configuring pgdg yum repository, is there any way to download rpm's from pgdg repository portal ? > > Well, I thought you might want to use the prepackaged version of > pgbackrest from the repository that matches the version of PostgreSQL > you have installed. So the command after installing the repository RPM > would look like this: > > # yum install pgbackrest > > In that way you won't need to compile anything from scratch and you can > count on the automated updates from the repository. Using the packages available from yum.postgresql.org is generally the best idea. If you must build from source the instructions for RHEL7 can be found here: https://pgbackrest.org/user-guide-centos7.html#build -- -David david@pgmasters.net
David and Jakub,
Thank you so much for reply.
I was able to install pgbackrest tool. when I tried to create stanza, I got below error. kindly help us on this.
[root@oralnx1 ~]# su - postgres
-bash-4.2$ source pg_5400_env.sh >>>> I have sourced my 11.2 version environment variables
-bash-4.2$ source pg_5400_env.sh >>>> I have sourced my 11.2 version environment variables
>>>>> tried to created stanza
postgres@oralnx1 ~> pgbackrest --stanza=visa-demo --log-path=/oratrace/pg_alert_log --repo-path=/orabackup/WORM/PGBACKUP/visa-demo-5400 --log-level-console=detail --log-level-file=detail stanza-create
2019-05-24 16:44:52.671 P00 INFO: stanza-create command begin 2.14: --log-level-console=detail --log-level-file=detail --log-path=/oratrace/pg_alert_log --pg1-path=/oradbaudit/pg_data_dir --repo1-path=/orabackup/WORM/PGBACKUP/visa-demo-5400 --stanza=visa-demo
ERROR [058]: : version '10' and path '/oratrace/pgdata_10.8' queried from cluster do not match version '11' and pg1-path '/oradbaudit/pg_data_dir' read from '/oradbaudit/pg_data_dir/global/pg_control'
HINT: the pg1-path and pg1-port settings likely reference different clusters
2019-05-24 16:44:53.906 P00 INFO: stanza-create command end: aborted with exception [058]
problem Is I do have postgres version 10 and 11 on same server. why pgbackrest is taking version 10 ?
please advise
On Fri, May 24, 2019 at 6:16 AM David Steele <david@pgmasters.net> wrote:
On 5/24/19 3:16 AM, Jakub Olczyk wrote:
>>
>> Instead of configuring pgdg yum repository, is there any way to download rpm's from pgdg repository portal ?
>
> Well, I thought you might want to use the prepackaged version of
> pgbackrest from the repository that matches the version of PostgreSQL
> you have installed. So the command after installing the repository RPM
> would look like this:
>
> # yum install pgbackrest
>
> In that way you won't need to compile anything from scratch and you can
> count on the automated updates from the repository.
Using the packages available from yum.postgresql.org is generally the
best idea.
If you must build from source the instructions for RHEL7 can be found here:
https://pgbackrest.org/user-guide-centos7.html#build
--
-David
david@pgmasters.net
--
Regards,
#! Pavan Kumar
-----------------------------------------------
Sr. Database Administrator..!
NEXT GENERATION PROFESSIONALS, LLC
Cell # 267-799-3182 # pavan.dba27 (Gtalk)
#! Pavan Kumar
-----------------------------------------------
Sr. Database Administrator..!
NEXT GENERATION PROFESSIONALS, LLC
Cell # 267-799-3182 # pavan.dba27 (Gtalk)
India # 9000459083
Take Risks; if you win, you will be very happy. If you lose you will be Wise
On 5/24/19 12:12 PM, Pavan Kumar wrote:
What's in your /etc/pgbackrest.conf file?
David and Jakub,Thank you so much for reply.I was able to install pgbackrest tool. when I tried to create stanza, I got below error. kindly help us on this.[root@oralnx1 ~]# su - postgres
-bash-4.2$ source pg_5400_env.sh >>>> I have sourced my 11.2 version environment variables>>>>> tried to created stanza
postgres@oralnx1 ~> pgbackrest --stanza=visa-demo --log-path=/oratrace/pg_alert_log --repo-path=/orabackup/WORM/PGBACKUP/visa-demo-5400 --log-level-console=detail --log-level-file=detail stanza-create
2019-05-24 16:44:52.671 P00 INFO: stanza-create command begin 2.14: --log-level-console=detail --log-level-file=detail --log-path=/oratrace/pg_alert_log --pg1-path=/oradbaudit/pg_data_dir --repo1-path=/orabackup/WORM/PGBACKUP/visa-demo-5400 --stanza=visa-demo
ERROR [058]: : version '10' and path '/oratrace/pgdata_10.8' queried from cluster do not match version '11' and pg1-path '/oradbaudit/pg_data_dir' read from '/oradbaudit/pg_data_dir/global/pg_control'
HINT: the pg1-path and pg1-port settings likely reference different clusters
2019-05-24 16:44:53.906 P00 INFO: stanza-create command end: aborted with exception [058]problem Is I do have postgres version 10 and 11 on same server. why pgbackrest is taking version 10 ?
What's in your /etc/pgbackrest.conf file?
please adviseOn Fri, May 24, 2019 at 6:16 AM David Steele <david@pgmasters.net> wrote:On 5/24/19 3:16 AM, Jakub Olczyk wrote:
>>
>> Instead of configuring pgdg yum repository, is there any way to download rpm's from pgdg repository portal ?
>
> Well, I thought you might want to use the prepackaged version of
> pgbackrest from the repository that matches the version of PostgreSQL
> you have installed. So the command after installing the repository RPM
> would look like this:
>
> # yum install pgbackrest
>
> In that way you won't need to compile anything from scratch and you can
> count on the automated updates from the repository.
Using the packages available from yum.postgresql.org is generally the
best idea.
If you must build from source the instructions for RHEL7 can be found here:
https://pgbackrest.org/user-guide-centos7.html#build
--
-David
david@pgmasters.net
--Regards,
#! Pavan Kumar
-----------------------------------------------
Sr. Database Administrator..!
NEXT GENERATION PROFESSIONALS, LLC
Cell # 267-799-3182 # pavan.dba27 (Gtalk)India # 9000459083Take Risks; if you win, you will be very happy. If you lose you will be Wise
--
Angular momentum makes the world go 'round.
Angular momentum makes the world go 'round.
Hello Ron,
I was able to fix the problem by adding pg1-port In /etc/pgbackrest/pgbackrest.con file
cat /etc/pgbackrest/pgbackrest.conf
[visa-demo]
pg1-path=/oradbaudit/pg_data_dir
pg1-port=5400
[visa-demo]
pg1-path=/oradbaudit/pg_data_dir
pg1-port=5400
pgbackrest --stanza=visa-demo --log-path=/oratrace/pg_alert_log --repo-path=/orabackup/WORM/PGBACKUP/visa-demo-5400 --log-level-console=detail --log-level-file=detail stanza-create
2019-05-24 17:47:48.360 P00 INFO: stanza-create command begin 2.14: --log-level-console=detail --log-level-file=detail --log-path=/oratrace/pg_alert_log --pg1-path=/oradbaudit/pg_data_dir --pg1-port=5400 --repo1-path=/orabackup/WORM/PGBACKUP/visa-demo-5400 --stanza=visa-demo
2019-05-24 17:47:49.778 P00 INFO: stanza-create command end: completed successfully (1419ms) >>>>>>>>>>.. created
2019-05-24 17:47:48.360 P00 INFO: stanza-create command begin 2.14: --log-level-console=detail --log-level-file=detail --log-path=/oratrace/pg_alert_log --pg1-path=/oradbaudit/pg_data_dir --pg1-port=5400 --repo1-path=/orabackup/WORM/PGBACKUP/visa-demo-5400 --stanza=visa-demo
2019-05-24 17:47:49.778 P00 INFO: stanza-create command end: completed successfully (1419ms) >>>>>>>>>>.. created
On Fri, May 24, 2019 at 1:16 PM Ron <ronljohnsonjr@gmail.com> wrote:
On 5/24/19 12:12 PM, Pavan Kumar wrote:David and Jakub,Thank you so much for reply.I was able to install pgbackrest tool. when I tried to create stanza, I got below error. kindly help us on this.[root@oralnx1 ~]# su - postgres
-bash-4.2$ source pg_5400_env.sh >>>> I have sourced my 11.2 version environment variables>>>>> tried to created stanza
postgres@oralnx1 ~> pgbackrest --stanza=visa-demo --log-path=/oratrace/pg_alert_log --repo-path=/orabackup/WORM/PGBACKUP/visa-demo-5400 --log-level-console=detail --log-level-file=detail stanza-create
2019-05-24 16:44:52.671 P00 INFO: stanza-create command begin 2.14: --log-level-console=detail --log-level-file=detail --log-path=/oratrace/pg_alert_log --pg1-path=/oradbaudit/pg_data_dir --repo1-path=/orabackup/WORM/PGBACKUP/visa-demo-5400 --stanza=visa-demo
ERROR [058]: : version '10' and path '/oratrace/pgdata_10.8' queried from cluster do not match version '11' and pg1-path '/oradbaudit/pg_data_dir' read from '/oradbaudit/pg_data_dir/global/pg_control'
HINT: the pg1-path and pg1-port settings likely reference different clusters
2019-05-24 16:44:53.906 P00 INFO: stanza-create command end: aborted with exception [058]problem Is I do have postgres version 10 and 11 on same server. why pgbackrest is taking version 10 ?
What's in your /etc/pgbackrest.conf file?please adviseOn Fri, May 24, 2019 at 6:16 AM David Steele <david@pgmasters.net> wrote:On 5/24/19 3:16 AM, Jakub Olczyk wrote:
>>
>> Instead of configuring pgdg yum repository, is there any way to download rpm's from pgdg repository portal ?
>
> Well, I thought you might want to use the prepackaged version of
> pgbackrest from the repository that matches the version of PostgreSQL
> you have installed. So the command after installing the repository RPM
> would look like this:
>
> # yum install pgbackrest
>
> In that way you won't need to compile anything from scratch and you can
> count on the automated updates from the repository.
Using the packages available from yum.postgresql.org is generally the
best idea.
If you must build from source the instructions for RHEL7 can be found here:
https://pgbackrest.org/user-guide-centos7.html#build
--
-David
david@pgmasters.net
--Regards,
#! Pavan Kumar
-----------------------------------------------
Sr. Database Administrator..!
NEXT GENERATION PROFESSIONALS, LLC
Cell # 267-799-3182 # pavan.dba27 (Gtalk)India # 9000459083Take Risks; if you win, you will be very happy. If you lose you will be Wise--
Angular momentum makes the world go 'round.
--
Regards,
#! Pavan Kumar
-----------------------------------------------
Sr. Database Administrator..!
NEXT GENERATION PROFESSIONALS, LLC
Cell # 267-799-3182 # pavan.dba27 (Gtalk)
#! Pavan Kumar
-----------------------------------------------
Sr. Database Administrator..!
NEXT GENERATION PROFESSIONALS, LLC
Cell # 267-799-3182 # pavan.dba27 (Gtalk)
India # 9000459083
Take Risks; if you win, you will be very happy. If you lose you will be Wise
On 5/24/19 1:12 PM, Pavan Kumar wrote: > > I was able to install pgbackrest tool. when I tried to create stanza, > I got below error. kindly help us on this. > > [root@oralnx1 ~]# su - postgres > -bash-4.2$ source pg_5400_env.sh >>>> I have sourced my 11.2 version > environment variables > >>>>>> tried to created stanza > > postgres@oralnx1 ~> pgbackrest --stanza=visa-demo > --log-path=/oratrace/pg_alert_log > --repo-path=/orabackup/WORM/PGBACKUP/visa-demo-5400 > --log-level-console=detail --log-level-file=detail stanza-create > 2019-05-24 16:44:52.671 P00 INFO: stanza-create command begin 2.14: > --log-level-console=detail --log-level-file=detail > --log-path=/oratrace/pg_alert_log --pg1-path=/oradbaudit/pg_data_dir > --repo1-path=/orabackup/WORM/PGBACKUP/visa-demo-5400 --stanza=visa-demo > ERROR [058]: : version '10' and path '/oratrace/pgdata_10.8' queried > from cluster do not match version '11' and pg1-path > '/oradbaudit/pg_data_dir' read from > '/oradbaudit/pg_data_dir/global/pg_control' > HINT: the pg1-path and pg1-port settings likely reference different clusters > 2019-05-24 16:44:53.906 P00 INFO: stanza-create command end: aborted > with exception [058] > > problem Is I do have postgres version 10 and 11 on same server. why > pgbackrest is taking version 10 ? It looks like you need to set pg1-port=5400 (This is a guess from your directory name); The servers are running on different ports -- you'll need to let pgBackRest know which one. -- -David david@pgmasters.net