You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-07 00:35:37 +02:00
Add Centos/RHEL 7 option to documentation build.
Centos/RHEL 7 builds can be specified with --var=os-type=centos7. Also added to the documentation release and CI builds.
This commit is contained in:
@ -135,6 +135,12 @@ eval
|
|||||||
# Remove all docker containers to get consistent IP address assignments
|
# Remove all docker containers to get consistent IP address assignments
|
||||||
executeTest('docker rm -f $(docker ps -a -q)', {bSuppressError => true});
|
executeTest('docker rm -f $(docker ps -a -q)', {bSuppressError => true});
|
||||||
|
|
||||||
|
# Generate deployment docs for RHEL/Centos 7
|
||||||
|
&log(INFO, "Generate RHEL/CentOS 7 documentation");
|
||||||
|
|
||||||
|
executeTest("${strDocExe} --deploy --key-var=os-type=centos7 --out=pdf", {bShowOutputAsync => true});
|
||||||
|
executeTest("${strDocExe} --deploy --cache-only --key-var=os-type=centos7 --out=pdf");
|
||||||
|
|
||||||
# Generate deployment docs for RHEL/Centos 6
|
# Generate deployment docs for RHEL/Centos 6
|
||||||
&log(INFO, "Generate RHEL/CentOS 6 documentation");
|
&log(INFO, "Generate RHEL/CentOS 6 documentation");
|
||||||
|
|
||||||
|
@ -155,6 +155,10 @@
|
|||||||
<p>Documentation may be built with user-specified packages.</p>
|
<p>Documentation may be built with user-specified packages.</p>
|
||||||
</release-item>
|
</release-item>
|
||||||
|
|
||||||
|
<release-item>
|
||||||
|
<p>Add Centos/RHEL 7 option to documentation build.</p>
|
||||||
|
</release-item>
|
||||||
|
|
||||||
<release-item>
|
<release-item>
|
||||||
<p>Create common <id>if</id> expressions for testing <id>os-type</id>.</p>
|
<p>Create common <id>if</id> expressions for testing <id>os-type</id>.</p>
|
||||||
</release-item>
|
</release-item>
|
||||||
|
@ -8,26 +8,32 @@
|
|||||||
<!-- Defined OS types -->
|
<!-- Defined OS types -->
|
||||||
<variable key="os-debian">debian</variable>
|
<variable key="os-debian">debian</variable>
|
||||||
<variable key="os-centos6">centos6</variable>
|
<variable key="os-centos6">centos6</variable>
|
||||||
|
<variable key="os-centos7">centos7</variable>
|
||||||
|
|
||||||
<!-- User-defined package to use in documentation -->
|
<!-- User-defined package to use in documentation -->
|
||||||
<variable key="package">none</variable>
|
<variable key="package">none</variable>
|
||||||
|
|
||||||
<!-- Defines the general OS type that will be used to generate commands. Also supported: centos6 -->
|
<!-- Defines the general OS type that will be used to generate commands. Also supported: centos6, centos7 -->
|
||||||
<variable key="os-type">debian</variable>
|
<variable key="os-type">debian</variable>
|
||||||
|
|
||||||
<!-- Common if expressions for testing os-type -->
|
<!-- Common if expressions for testing os-type -->
|
||||||
<variable key="os-type-is-debian">'{[os-type]}' eq '{[os-debian]}'</variable>
|
<variable key="os-type-is-debian">'{[os-type]}' eq '{[os-debian]}'</variable>
|
||||||
<variable key="os-type-is-centos6">'{[os-type]}' eq '{[os-centos6]}'</variable>
|
<variable key="os-type-is-centos6">'{[os-type]}' eq '{[os-centos6]}'</variable>
|
||||||
|
<variable key="os-type-is-centos7">'{[os-type]}' eq '{[os-centos7]}'</variable>
|
||||||
|
<variable key="os-type-is-centos">{[os-type-is-centos6]} || {[os-type-is-centos7]}</variable>
|
||||||
|
|
||||||
<!-- Defines the container image that will be used to build the host -->
|
<!-- Defines the container image that will be used to build the host -->
|
||||||
<variable key="os-image" if="{[os-type-is-debian]}">ubuntu:16.04</variable>
|
<variable key="os-image" if="{[os-type-is-debian]}">ubuntu:16.04</variable>
|
||||||
<variable key="os-image" if="{[os-type-is-centos6]}">centos:6</variable>
|
<variable key="os-image" if="{[os-type-is-centos6]}">centos:6</variable>
|
||||||
|
<variable key="os-image" if="{[os-type-is-centos7]}">centos:7</variable>
|
||||||
|
|
||||||
<variable key="user-guide-subtitle" if="{[os-type-is-debian]}">Debian & Ubuntu</variable>
|
<variable key="user-guide-subtitle" if="{[os-type-is-debian]}">Debian & Ubuntu</variable>
|
||||||
<variable key="user-guide-subtitle" if="{[os-type-is-centos6]}">RHEL & CentOS 6</variable>
|
<variable key="user-guide-subtitle" if="{[os-type-is-centos6]}">RHEL & CentOS 6</variable>
|
||||||
|
<variable key="user-guide-subtitle" if="{[os-type-is-centos7]}">RHEL & CentOS 7</variable>
|
||||||
|
|
||||||
<variable key="user-guide-os" if="{[os-type-is-debian]}">Debian/Ubuntu</variable>
|
<variable key="user-guide-os" if="{[os-type-is-debian]}">Debian/Ubuntu</variable>
|
||||||
<variable key="user-guide-os" if="{[os-type-is-centos6]}">RHEL/CentOS 6</variable>
|
<variable key="user-guide-os" if="{[os-type-is-centos6]}">RHEL/CentOS 6</variable>
|
||||||
|
<variable key="user-guide-os" if="{[os-type-is-centos7]}">RHEL/CentOS 7</variable>
|
||||||
|
|
||||||
<variable key="pgbackrest-path" eval="y">
|
<variable key="pgbackrest-path" eval="y">
|
||||||
use File::Basename qw(dirname);
|
use File::Basename qw(dirname);
|
||||||
@ -37,20 +43,20 @@
|
|||||||
</variable>
|
</variable>
|
||||||
|
|
||||||
<variable key="pg-version" if="{[os-type-is-debian]}">9.4</variable>
|
<variable key="pg-version" if="{[os-type-is-debian]}">9.4</variable>
|
||||||
<variable key="pg-version" if="{[os-type-is-centos6]}">9.5</variable>
|
<variable key="pg-version" if="{[os-type-is-centos]}">9.5</variable>
|
||||||
<variable key="pg-version-nodot">95</variable>
|
<variable key="pg-version-nodot">95</variable>
|
||||||
<variable key="pg-version-upgrade" if="{[os-type-is-debian]}">9.5</variable>
|
<variable key="pg-version-upgrade" if="{[os-type-is-debian]}">9.5</variable>
|
||||||
<variable key="pg-version-upgrade" if="{[os-type-is-centos6]}">9.6</variable>
|
<variable key="pg-version-upgrade" if="{[os-type-is-centos]}">9.6</variable>
|
||||||
<variable key="pg-version-upgrade-nodot" if="{[os-type-is-centos6]}">96</variable>
|
<variable key="pg-version-upgrade-nodot" if="{[os-type-is-centos]}">96</variable>
|
||||||
|
|
||||||
<variable key="pg-bin-path" if="{[os-type-is-debian]}">/usr/lib/postgresql/{[pg-version]}/bin</variable>
|
<variable key="pg-bin-path" if="{[os-type-is-debian]}">/usr/lib/postgresql/{[pg-version]}/bin</variable>
|
||||||
<variable key="pg-bin-path" if="{[os-type-is-centos6]}">/usr/pgsql-{[pg-version]}/bin</variable>
|
<variable key="pg-bin-path" if="{[os-type-is-centos]}">/usr/pgsql-{[pg-version]}/bin</variable>
|
||||||
|
|
||||||
<variable key="pg-bin-upgrade-path" if="{[os-type-is-debian]}">/usr/lib/postgresql/{[pg-version-upgrade]}/bin</variable>
|
<variable key="pg-bin-upgrade-path" if="{[os-type-is-debian]}">/usr/lib/postgresql/{[pg-version-upgrade]}/bin</variable>
|
||||||
<variable key="pg-bin-upgrade-path" if="{[os-type-is-centos6]}">/usr/pgsql-{[pg-version-upgrade]}/bin</variable>
|
<variable key="pg-bin-upgrade-path" if="{[os-type-is-centos]}">/usr/pgsql-{[pg-version-upgrade]}/bin</variable>
|
||||||
|
|
||||||
<variable key="pg-home-path" if="{[os-type-is-debian]}">/var/lib/postgresql</variable>
|
<variable key="pg-home-path" if="{[os-type-is-debian]}">/var/lib/postgresql</variable>
|
||||||
<variable key="pg-home-path" if="{[os-type-is-centos6]}">/var/lib/pgsql</variable>
|
<variable key="pg-home-path" if="{[os-type-is-centos]}">/var/lib/pgsql</variable>
|
||||||
|
|
||||||
<variable key="pg-group">postgres</variable>
|
<variable key="pg-group">postgres</variable>
|
||||||
|
|
||||||
@ -72,46 +78,44 @@
|
|||||||
<variable if="'{[package]}' ne 'none'" key="backrest-config-demo">/etc/{[project-exe]}.conf</variable>
|
<variable if="'{[package]}' ne 'none'" key="backrest-config-demo">/etc/{[project-exe]}.conf</variable>
|
||||||
|
|
||||||
<variable key="pg-path-default" if="{[os-type-is-debian]}">/var/lib/postgresql/[version]/[cluster]</variable>
|
<variable key="pg-path-default" if="{[os-type-is-debian]}">/var/lib/postgresql/[version]/[cluster]</variable>
|
||||||
<variable key="pg-path-default" if="{[os-type-is-centos6]}">/var/lib/pgsql/[version]/data</variable>
|
<variable key="pg-path-default" if="{[os-type-is-centos]}">/var/lib/pgsql/[version]/data</variable>
|
||||||
|
|
||||||
<variable key="pg-path" if="{[os-type-is-debian]}">/var/lib/postgresql/{[pg-version]}/{[postgres-cluster-demo]}</variable>
|
<variable key="pg-path" if="{[os-type-is-debian]}">/var/lib/postgresql/{[pg-version]}/{[postgres-cluster-demo]}</variable>
|
||||||
<variable key="pg-path" if="{[os-type-is-centos6]}">/var/lib/pgsql/{[pg-version]}/data</variable>
|
<variable key="pg-path" if="{[os-type-is-centos]}">/var/lib/pgsql/{[pg-version]}/data</variable>
|
||||||
|
|
||||||
<variable key="pg-path-upgrade" if="{[os-type-is-debian]}">/var/lib/postgresql/{[pg-version-upgrade]}/{[postgres-cluster-demo]}</variable>
|
<variable key="pg-path-upgrade" if="{[os-type-is-debian]}">/var/lib/postgresql/{[pg-version-upgrade]}/{[postgres-cluster-demo]}</variable>
|
||||||
<variable key="pg-path-upgrade" if="{[os-type-is-centos6]}">/var/lib/pgsql/{[pg-version-upgrade]}/data</variable>
|
<variable key="pg-path-upgrade" if="{[os-type-is-centos]}">/var/lib/pgsql/{[pg-version-upgrade]}/data</variable>
|
||||||
|
|
||||||
<variable key="spool-path">/var/spool/pgbackrest</variable>
|
<variable key="spool-path">/var/spool/pgbackrest</variable>
|
||||||
|
|
||||||
<variable key="postgres-config-demo" if="{[os-type-is-debian]}">/etc/postgresql/{[pg-version]}/{[postgres-cluster-demo]}/postgresql.conf</variable>
|
<variable key="postgres-config-demo" if="{[os-type-is-debian]}">/etc/postgresql/{[pg-version]}/{[postgres-cluster-demo]}/postgresql.conf</variable>
|
||||||
<variable key="postgres-config-demo" if="{[os-type-is-centos6]}">{[pg-path]}/postgresql.conf</variable>
|
<variable key="postgres-config-demo" if="{[os-type-is-centos]}">{[pg-path]}/postgresql.conf</variable>
|
||||||
|
|
||||||
<variable key="postgres-config-demo-upgrade" if="{[os-type-is-debian]}">/etc/postgresql/{[pg-version-upgrade]}/{[postgres-cluster-demo]}/postgresql.conf</variable>
|
<variable key="postgres-config-demo-upgrade" if="{[os-type-is-debian]}">/etc/postgresql/{[pg-version-upgrade]}/{[postgres-cluster-demo]}/postgresql.conf</variable>
|
||||||
<variable key="postgres-config-demo-upgrade" if="{[os-type-is-centos6]}">{[pg-path-upgrade]}/postgresql.conf</variable>
|
<variable key="postgres-config-demo-upgrade" if="{[os-type-is-centos]}">{[pg-path-upgrade]}/postgresql.conf</variable>
|
||||||
|
|
||||||
<variable key="postgres-hba-demo" if="{[os-type-is-debian]}">/etc/postgresql/{[pg-version]}/{[postgres-cluster-demo]}/pg_hba.conf</variable>
|
<variable key="postgres-hba-demo" if="{[os-type-is-debian]}">/etc/postgresql/{[pg-version]}/{[postgres-cluster-demo]}/pg_hba.conf</variable>
|
||||||
<variable key="postgres-hba-demo" if="{[os-type-is-centos6]}">{[pg-path]}/pg_hba.conf</variable>
|
<variable key="postgres-hba-demo" if="{[os-type-is-centos]}">{[pg-path]}/pg_hba.conf</variable>
|
||||||
|
|
||||||
<variable key="postgres-hba-demo-upgrade" if="{[os-type-is-debian]}">/etc/postgresql/{[pg-version-upgrade]}/{[postgres-cluster-demo]}/pg_hba.conf</variable>
|
<variable key="postgres-hba-demo-upgrade" if="{[os-type-is-debian]}">/etc/postgresql/{[pg-version-upgrade]}/{[postgres-cluster-demo]}/pg_hba.conf</variable>
|
||||||
<variable key="postgres-hba-demo-upgrade" if="{[os-type-is-centos6]}">{[pg-path-upgrade]}/pg_hba.conf</variable>
|
<variable key="postgres-hba-demo-upgrade" if="{[os-type-is-centos]}">{[pg-path-upgrade]}/pg_hba.conf</variable>
|
||||||
|
|
||||||
<variable key="postgres-pgpass">{[pg-home-path]}/.pgpass</variable>
|
<variable key="postgres-pgpass">{[pg-home-path]}/.pgpass</variable>
|
||||||
|
|
||||||
<variable key="postgres-log-demo" if="{[os-type-is-debian]}">/var/log/postgresql/postgresql-{[pg-version]}-{[postgres-cluster-demo]}.log</variable>
|
<variable key="postgres-log-demo" if="{[os-type-is-debian]}">/var/log/postgresql/postgresql-{[pg-version]}-{[postgres-cluster-demo]}.log</variable>
|
||||||
<variable key="postgres-log-demo" if="{[os-type-is-centos6]}">{[pg-path]}/pg_log/postgresql.log</variable>
|
<variable key="postgres-log-demo" if="{[os-type-is-centos]}">{[pg-path]}/pg_log/postgresql.log</variable>
|
||||||
|
|
||||||
<variable key="postgres-log-pgstartup-demo" if="{[os-type-is-centos6]}">/var/lib/pgsql/{[pg-version]}/pgstartup.log</variable>
|
<variable key="postgres-log-pgstartup-demo" if="{[os-type-is-centos]}">/var/lib/pgsql/{[pg-version]}/pgstartup.log</variable>
|
||||||
|
|
||||||
<variable key="postgres-recovery-demo" if="{[os-type-is-debian]}">{[pg-path]}/recovery.conf</variable>
|
<variable key="postgres-recovery-demo">{[pg-path]}/recovery.conf</variable>
|
||||||
<variable key="postgres-recovery-demo" if="{[os-type-is-centos6]}">{[pg-path]}/recovery.conf</variable>
|
|
||||||
|
|
||||||
<variable key="pg-switch-wal">pg_switch_xlog</variable>
|
<variable key="pg-switch-wal">pg_switch_xlog</variable>
|
||||||
|
|
||||||
<!-- Hosts -->
|
<!-- Hosts -->
|
||||||
<variable key="host-os" if="{[os-type-is-debian]}">u16</variable>
|
|
||||||
<variable key="host-os" if="{[os-type-is-centos6]}">co6</variable>
|
|
||||||
|
|
||||||
<variable key="host-image">pgbackrest/doc:{[os-type]}</variable>
|
<variable key="host-image">pgbackrest/doc:{[os-type]}</variable>
|
||||||
|
|
||||||
|
<variable key="host-option">-v /sys/fs/cgroup:/sys/fs/cgroup:ro -v /tmp/$(mktemp -d):/run</variable>
|
||||||
|
|
||||||
<variable key="host-user" eval="y">use English; getpwuid($UID) eq 'root' ? 'vagrant' : getpwuid($UID) . ''</variable>
|
<variable key="host-user" eval="y">use English; getpwuid($UID) eq 'root' ? 'vagrant' : getpwuid($UID) . ''</variable>
|
||||||
<variable key="host-mount">{[pgbackrest-path]}:/backrest</variable>
|
<variable key="host-mount">{[pgbackrest-path]}:/backrest</variable>
|
||||||
<variable key="image-repo">pgbackrest/test</variable>
|
<variable key="image-repo">pgbackrest/test</variable>
|
||||||
@ -153,27 +157,36 @@
|
|||||||
<variable key="pg-cluster-wait">sleep 2</variable>
|
<variable key="pg-cluster-wait">sleep 2</variable>
|
||||||
|
|
||||||
<variable key="pg-cluster-create" if="{[os-type-is-debian]}">pg_createcluster {[pg-version]} {[postgres-cluster-demo]}</variable>
|
<variable key="pg-cluster-create" if="{[os-type-is-debian]}">pg_createcluster {[pg-version]} {[postgres-cluster-demo]}</variable>
|
||||||
<variable key="pg-cluster-create" if="{[os-type-is-centos6]}">service postgresql-{[pg-version]} initdb</variable>
|
|
||||||
|
|
||||||
<variable key="pg-cluster-create-upgrade" if="{[os-type-is-debian]}">pg_createcluster {[pg-version-upgrade]} {[postgres-cluster-demo]}</variable>
|
<variable key="pg-cluster-create-upgrade" if="{[os-type-is-debian]}">pg_createcluster {[pg-version-upgrade]} {[postgres-cluster-demo]}</variable>
|
||||||
|
|
||||||
<variable key="pg-cluster-start" if="{[os-type-is-debian]}">pg_ctlcluster {[pg-version]} {[postgres-cluster-demo]} start</variable>
|
<variable key="pg-cluster-start" if="{[os-type-is-debian]}">pg_ctlcluster {[pg-version]} {[postgres-cluster-demo]} start</variable>
|
||||||
<variable key="pg-cluster-start" if="{[os-type-is-centos6]}">service postgresql-{[pg-version]} start</variable>
|
<variable key="pg-cluster-start" if="{[os-type-is-centos6]}">service postgresql-{[pg-version]} start</variable>
|
||||||
|
<variable key="pg-cluster-start" if="{[os-type-is-centos7]}">systemctl start postgresql-{[pg-version]}.service</variable>
|
||||||
|
|
||||||
<variable key="pg-cluster-start-upgrade" if="{[os-type-is-debian]}">pg_ctlcluster {[pg-version-upgrade]} {[postgres-cluster-demo]} start</variable>
|
<variable key="pg-cluster-start-upgrade" if="{[os-type-is-debian]}">pg_ctlcluster {[pg-version-upgrade]} {[postgres-cluster-demo]} start</variable>
|
||||||
<variable key="pg-cluster-start-upgrade" if="{[os-type-is-centos6]}">service postgresql-{[pg-version-upgrade]} start</variable>
|
<variable key="pg-cluster-start-upgrade" if="{[os-type-is-centos6]}">service postgresql-{[pg-version-upgrade]} start</variable>
|
||||||
|
<variable key="pg-cluster-start-upgrade" if="{[os-type-is-centos7]}">systemctl start postgresql-{[pg-version-upgrade]}.service</variable>
|
||||||
|
|
||||||
<variable key="pg-cluster-stop" if="{[os-type-is-debian]}">pg_ctlcluster {[pg-version]} {[postgres-cluster-demo]} stop</variable>
|
<variable key="pg-cluster-stop" if="{[os-type-is-debian]}">pg_ctlcluster {[pg-version]} {[postgres-cluster-demo]} stop</variable>
|
||||||
<variable key="pg-cluster-stop" if="{[os-type-is-centos6]}">service postgresql-{[pg-version]} stop</variable>
|
<variable key="pg-cluster-stop" if="{[os-type-is-centos6]}">service postgresql-{[pg-version]} stop</variable>
|
||||||
|
<variable key="pg-cluster-stop" if="{[os-type-is-centos7]}">systemctl stop postgresql-{[pg-version]}.service</variable>
|
||||||
|
|
||||||
<variable key="pg-cluster-restart" if="{[os-type-is-debian]}">pg_ctlcluster {[pg-version]} {[postgres-cluster-demo]} restart</variable>
|
<variable key="pg-cluster-restart" if="{[os-type-is-debian]}">pg_ctlcluster {[pg-version]} {[postgres-cluster-demo]} restart</variable>
|
||||||
<variable key="pg-cluster-restart" if="{[os-type-is-centos6]}">service postgresql-{[pg-version]} restart</variable>
|
<variable key="pg-cluster-restart" if="{[os-type-is-centos6]}">service postgresql-{[pg-version]} restart</variable>
|
||||||
|
<variable key="pg-cluster-restart" if="{[os-type-is-centos7]}">systemctl restart postgresql-{[pg-version]}.service</variable>
|
||||||
|
|
||||||
<variable key="pg-cluster-reload" if="{[os-type-is-debian]}">pg_ctlcluster {[pg-version]} {[postgres-cluster-demo]} reload</variable>
|
<variable key="pg-cluster-reload" if="{[os-type-is-debian]}">pg_ctlcluster {[pg-version]} {[postgres-cluster-demo]} reload</variable>
|
||||||
<variable key="pg-cluster-reload" if="{[os-type-is-centos6]}">service postgresql-{[pg-version]} reload</variable>
|
<variable key="pg-cluster-reload" if="{[os-type-is-centos6]}">service postgresql-{[pg-version]} reload</variable>
|
||||||
|
<variable key="pg-cluster-reload" if="{[os-type-is-centos7]}">systemctl reload postgresql-{[pg-version]}.service</variable>
|
||||||
|
|
||||||
|
<variable key="pg-cluster-check" if="{[os-type-is-debian]}">pg_lsclusters</variable>
|
||||||
|
<variable key="pg-cluster-check" if="{[os-type-is-centos6]}">service postgresql-{[pg-version]} status</variable>
|
||||||
|
<variable key="pg-cluster-check" if="{[os-type-is-centos7]}">systemctl status postgresql-{[pg-version]}.service</variable>
|
||||||
|
|
||||||
<variable key="pg-cluster-check-upgrade" if="{[os-type-is-debian]}">pg_lsclusters</variable>
|
<variable key="pg-cluster-check-upgrade" if="{[os-type-is-debian]}">pg_lsclusters</variable>
|
||||||
<variable key="pg-cluster-check-upgrade" if="{[os-type-is-centos6]}">service postgresql-{[pg-version-upgrade]} status</variable>
|
<variable key="pg-cluster-check-upgrade" if="{[os-type-is-centos6]}">service postgresql-{[pg-version-upgrade]} status</variable>
|
||||||
|
<variable key="pg-cluster-check-upgrade" if="{[os-type-is-centos7]}">systemctl status postgresql-{[pg-version-upgrade]}.service</variable>
|
||||||
|
|
||||||
<!-- Common commands -->
|
<!-- Common commands -->
|
||||||
<variable key="ssh-key-install">
|
<variable key="ssh-key-install">
|
||||||
@ -243,8 +256,15 @@
|
|||||||
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
|
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key
|
||||||
|
|
||||||
# Install PostgreSQL
|
# Install PostgreSQL
|
||||||
RUN rpm -ivh http://yum.postgresql.org/9.5/redhat/rhel-6-x86_64/pgdg-centos95-9.5-3.noarch.rpm \
|
RUN rpm -ivh http://yum.postgresql.org/9.0/redhat/rhel-6-x86_64/pgdg-centos90-9.0-5.noarch.rpm \
|
||||||
http://yum.postgresql.org/9.6/redhat/rhel-6-x86_64/pgdg-centos96-9.6-3.noarch.rpm && \
|
http://yum.postgresql.org/9.1/redhat/rhel-6-x86_64/pgdg-centos91-9.1-6.noarch.rpm \
|
||||||
|
http://yum.postgresql.org/9.2/redhat/rhel-6-x86_64/pgdg-centos92-9.2-8.noarch.rpm \
|
||||||
|
http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-3.noarch.rpm \
|
||||||
|
http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-centos94-9.4-3.noarch.rpm \
|
||||||
|
http://yum.postgresql.org/9.5/redhat/rhel-6-x86_64/pgdg-centos95-9.5-3.noarch.rpm \
|
||||||
|
http://yum.postgresql.org/9.6/redhat/rhel-6-x86_64/pgdg-centos96-9.6-3.noarch.rpm \
|
||||||
|
http://yum.postgresql.org/10/redhat/rhel-6-x86_64/pgdg-centos10-10-2.noarch.rpm \
|
||||||
|
http://yum.postgresql.org/11/redhat/rhel-6-x86_64/pgdg-centos11-11-2.noarch.rpm && \
|
||||||
yum install -y postgresql{[pg-version-nodot]}-server postgresql{[pg-version-upgrade-nodot]}-server
|
yum install -y postgresql{[pg-version-nodot]}-server postgresql{[pg-version-upgrade-nodot]}-server
|
||||||
|
|
||||||
# Create an ssh key for root so all hosts can ssh to each other as root
|
# Create an ssh key for root so all hosts can ssh to each other as root
|
||||||
@ -257,6 +277,50 @@
|
|||||||
ENTRYPOINT /usr/sbin/sshd -D
|
ENTRYPOINT /usr/sbin/sshd -D
|
||||||
</host-define>
|
</host-define>
|
||||||
|
|
||||||
|
<host-define if="{[os-type-is-centos7]}" image="{[host-image]}" from="{[os-image]}">
|
||||||
|
ENV container docker
|
||||||
|
|
||||||
|
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == \
|
||||||
|
systemd-tmpfiles-setup.service ] || rm -f $i; done); \
|
||||||
|
rm -f /lib/systemd/system/multi-user.target.wants/*;\
|
||||||
|
rm -f /etc/systemd/system/*.wants/*;\
|
||||||
|
rm -f /lib/systemd/system/local-fs.target.wants/*; \
|
||||||
|
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
|
||||||
|
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
|
||||||
|
rm -f /lib/systemd/system/basic.target.wants/*;\
|
||||||
|
rm -f /lib/systemd/system/anaconda.target.wants/*;
|
||||||
|
|
||||||
|
VOLUME [ "/sys/fs/cgroup" ]
|
||||||
|
|
||||||
|
# Install packages
|
||||||
|
RUN yum install -y openssh-server openssh-clients sudo wget vim 2>&1
|
||||||
|
|
||||||
|
# Regenerate SSH keys
|
||||||
|
RUN rm -f /etc/ssh/ssh_host_rsa_key* && \
|
||||||
|
ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key && \
|
||||||
|
rm -f /etc/ssh/ssh_host_dsa_key* && \
|
||||||
|
ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key
|
||||||
|
|
||||||
|
# Install PostgreSQL
|
||||||
|
RUN rpm -ivh http://yum.postgresql.org/9.2/redhat/rhel-7-x86_64/pgdg-centos92-9.2-3.noarch.rpm \
|
||||||
|
http://yum.postgresql.org/9.3/redhat/rhel-7-x86_64/pgdg-centos93-9.3-3.noarch.rpm \
|
||||||
|
http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-3.noarch.rpm \
|
||||||
|
http://yum.postgresql.org/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-3.noarch.rpm \
|
||||||
|
http://yum.postgresql.org/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm \
|
||||||
|
http://yum.postgresql.org/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm \
|
||||||
|
http://yum.postgresql.org/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm && \
|
||||||
|
yum install -y postgresql{[pg-version-nodot]}-server postgresql{[pg-version-upgrade-nodot]}-server
|
||||||
|
|
||||||
|
# Create an ssh key for root so all hosts can ssh to each other as root
|
||||||
|
RUN \ {[ssh-key-install]}
|
||||||
|
|
||||||
|
# Add doc user with sudo privileges
|
||||||
|
RUN adduser -n {[host-user]} && \
|
||||||
|
echo '{[host-user]} ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/{[host-user]}
|
||||||
|
|
||||||
|
CMD ["/usr/sbin/init"]
|
||||||
|
</host-define>
|
||||||
|
|
||||||
<!-- ======================================================================================================================= -->
|
<!-- ======================================================================================================================= -->
|
||||||
<block-define id="setup-ssh-intro">
|
<block-define id="setup-ssh-intro">
|
||||||
<p><backrest/> requires passwordless SSH to enable communication between the hosts.</p>
|
<p><backrest/> requires passwordless SSH to enable communication between the hosts.</p>
|
||||||
@ -357,6 +421,11 @@
|
|||||||
perl-Digest-SHA perl-DBD-Pg</exe-cmd>
|
perl-Digest-SHA perl-DBD-Pg</exe-cmd>
|
||||||
<exe-cmd-extra>-y 2>&1</exe-cmd-extra>
|
<exe-cmd-extra>-y 2>&1</exe-cmd-extra>
|
||||||
</execute>
|
</execute>
|
||||||
|
|
||||||
|
<execute if="{[os-type-is-centos7]}" user="root" pre="y">
|
||||||
|
<exe-cmd>yum install perl perl-Time-HiRes perl-Digest-SHA perl-DBD-Pg perl-JSON-PP</exe-cmd>
|
||||||
|
<exe-cmd-extra>-y 2>&1</exe-cmd-extra>
|
||||||
|
</execute>
|
||||||
</execute-list>
|
</execute-list>
|
||||||
|
|
||||||
<p>Finally, <backrest/> requires log and configuration directories and a configuration file.</p>
|
<p>Finally, <backrest/> requires log and configuration directories and a configuration file.</p>
|
||||||
@ -406,12 +475,12 @@
|
|||||||
<exe-cmd>apt-get install pgbackrest</exe-cmd>
|
<exe-cmd>apt-get install pgbackrest</exe-cmd>
|
||||||
</execute>
|
</execute>
|
||||||
|
|
||||||
<execute if="{[os-type-is-centos6]}" user="root" show="n">
|
<execute if="{[os-type-is-centos]}" user="root" show="n">
|
||||||
<exe-cmd>yum -y install {[pgbackrest-path]}/{[package]}</exe-cmd>
|
<exe-cmd>yum -y install {[pgbackrest-path]}/{[package]}</exe-cmd>
|
||||||
<exe-cmd-extra>-y 2>&1</exe-cmd-extra>
|
<exe-cmd-extra>-y 2>&1</exe-cmd-extra>
|
||||||
</execute>
|
</execute>
|
||||||
|
|
||||||
<execute if="{[os-type-is-centos6]}" user="root" skip="y">
|
<execute if="{[os-type-is-centos]}" user="root" skip="y">
|
||||||
<exe-cmd>yum install pgbackrest</exe-cmd>
|
<exe-cmd>yum install pgbackrest</exe-cmd>
|
||||||
</execute>
|
</execute>
|
||||||
</execute-list>
|
</execute-list>
|
||||||
@ -546,9 +615,9 @@
|
|||||||
|
|
||||||
<p if="{[os-type-is-debian]}">{[user-guide-os]} packages for <backrest/> are available at <link url="https://www.postgresql.org/download/linux/ubuntu/">apt.postgresql.org</link>. If they are not provided for your distribution/version it is easy to download the source and install manually.</p>
|
<p if="{[os-type-is-debian]}">{[user-guide-os]} packages for <backrest/> are available at <link url="https://www.postgresql.org/download/linux/ubuntu/">apt.postgresql.org</link>. If they are not provided for your distribution/version it is easy to download the source and install manually.</p>
|
||||||
|
|
||||||
<p if="{[os-type-is-centos6]}">{[user-guide-os]} packages for <backrest/> are available from <link url="{[crunchy-url-base]}">Crunchy Data</link> or <link url="http://yum.postgresql.org">yum.postgresql.org</link>, but it is also easy to download the source and install manually.</p>
|
<p if="{[os-type-is-centos]}">{[user-guide-os]} packages for <backrest/> are available from <link url="{[crunchy-url-base]}">Crunchy Data</link> or <link url="http://yum.postgresql.org">yum.postgresql.org</link>, but it is also easy to download the source and install manually.</p>
|
||||||
|
|
||||||
<host-add id="{[host-build-id]}" name="{[host-build]}" user="{[host-build-user]}" image="{[host-build-image]}" os="{[os-type]}" mount="{[host-build-mount]}"/>
|
<host-add id="{[host-build-id]}" name="{[host-build]}" user="{[host-build-user]}" image="{[host-build-image]}" os="{[os-type]}" mount="{[host-build-mount]}" option="{[host-option]}"/>
|
||||||
|
|
||||||
<p>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. <backrest/> consists of a single executable so it is easy to copy to a new host once it is built.</p>
|
<p>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. <backrest/> consists of a single executable so it is easy to copy to a new host once it is built.</p>
|
||||||
|
|
||||||
@ -593,6 +662,14 @@
|
|||||||
</exe-cmd>
|
</exe-cmd>
|
||||||
<exe-cmd-extra>-y 2>&1</exe-cmd-extra>
|
<exe-cmd-extra>-y 2>&1</exe-cmd-extra>
|
||||||
</execute>
|
</execute>
|
||||||
|
|
||||||
|
<execute if="{[os-type-is-centos7]}" user="root" pre="y">
|
||||||
|
<exe-cmd>
|
||||||
|
yum install build-essential gcc make openssl-devel libxml2-devel
|
||||||
|
perl-ExtUtils-Embed
|
||||||
|
</exe-cmd>
|
||||||
|
<exe-cmd-extra>-y 2>&1</exe-cmd-extra>
|
||||||
|
</execute>
|
||||||
</execute-list>
|
</execute-list>
|
||||||
|
|
||||||
<p><backrest/> supports 32-bit distributions that build Perl with 64-bit integer support.</p>
|
<p><backrest/> supports 32-bit distributions that build Perl with 64-bit integer support.</p>
|
||||||
@ -630,7 +707,7 @@
|
|||||||
|
|
||||||
<p>A new host named <host>pg1</host> is created to contain the demo cluster and run <backrest/> examples.</p>
|
<p>A new host named <host>pg1</host> is created to contain the demo cluster and run <backrest/> examples.</p>
|
||||||
|
|
||||||
<host-add id="{[host-pg1-id]}" name="{[host-pg1]}" user="{[host-pg1-user]}" image="{[host-pg1-image]}" os="{[os-type]}" mount="{[host-pg1-mount]}"/>
|
<host-add id="{[host-pg1-id]}" name="{[host-pg1]}" user="{[host-pg1-user]}" image="{[host-pg1-image]}" os="{[os-type]}" mount="{[host-pg1-mount]}" option="{[host-option]}"/>
|
||||||
|
|
||||||
<execute-list if="{[pg-version]} >= 11" host="{[host-pg1]}">
|
<execute-list if="{[pg-version]} >= 11" host="{[host-pg1]}">
|
||||||
<title>Create <user>{[br-user]}</user> user</title>
|
<title>Create <user>{[br-user]}</user> user</title>
|
||||||
@ -638,7 +715,7 @@
|
|||||||
<execute if="{[os-type-is-debian]}" user="root">
|
<execute if="{[os-type-is-debian]}" user="root">
|
||||||
<exe-cmd>adduser --ingroup {[pg-group]} --disabled-password --gecos "" {[br-user]}</exe-cmd>
|
<exe-cmd>adduser --ingroup {[pg-group]} --disabled-password --gecos "" {[br-user]}</exe-cmd>
|
||||||
</execute>
|
</execute>
|
||||||
<execute if="{[os-type-is-centos6]}" user="root">
|
<execute if="{[os-type-is-centos]}" user="root">
|
||||||
<exe-cmd>adduser -g{[pg-group]} -n {[br-user]}</exe-cmd>
|
<exe-cmd>adduser -g{[pg-group]} -n {[br-user]}</exe-cmd>
|
||||||
</execute>
|
</execute>
|
||||||
</execute-list>
|
</execute-list>
|
||||||
@ -702,9 +779,9 @@
|
|||||||
<postgres-config-option key="log_line_prefix">''</postgres-config-option>
|
<postgres-config-option key="log_line_prefix">''</postgres-config-option>
|
||||||
</postgres-config>
|
</postgres-config>
|
||||||
|
|
||||||
<p if="{[os-type-is-centos6]}">By default {[user-guide-os]} includes the day of the week in the log filename. This makes automating the user guide a bit more complicated so the <pg-option>log_filename</pg-option> is set to a constant.</p>
|
<p if="{[os-type-is-centos]}">By default {[user-guide-os]} includes the day of the week in the log filename. This makes automating the user guide a bit more complicated so the <pg-option>log_filename</pg-option> is set to a constant.</p>
|
||||||
|
|
||||||
<postgres-config host="{[host-pg1]}" if="{[os-type-is-centos6]}" file="{[postgres-config-demo]}">
|
<postgres-config host="{[host-pg1]}" if="{[os-type-is-centos]}" file="{[postgres-config-demo]}">
|
||||||
<title>Set <pg-option>log_filename</pg-option></title>
|
<title>Set <pg-option>log_filename</pg-option></title>
|
||||||
|
|
||||||
<postgres-config-option key="log_filename">'postgresql.log'</postgres-config-option>
|
<postgres-config-option key="log_filename">'postgresql.log'</postgres-config-option>
|
||||||
@ -1024,15 +1101,11 @@
|
|||||||
<exe-highlight>could not find the database system</exe-highlight>
|
<exe-highlight>could not find the database system</exe-highlight>
|
||||||
</execute>
|
</execute>
|
||||||
|
|
||||||
<execute user="postgres" show="n">
|
|
||||||
<exe-cmd>{[pg-cluster-wait]}</exe-cmd>
|
|
||||||
</execute>
|
|
||||||
|
|
||||||
<execute if="{[os-type-is-centos6]}" user="root" show="n">
|
<execute if="{[os-type-is-centos6]}" user="root" show="n">
|
||||||
<exe-cmd>rm -f {[postgres-log-pgstartup-demo]}</exe-cmd>
|
<exe-cmd>rm -f {[postgres-log-pgstartup-demo]}</exe-cmd>
|
||||||
</execute>
|
</execute>
|
||||||
|
|
||||||
<execute if="{[os-type-is-centos6]}" user="root" err-expect="1">
|
<execute if="{[os-type-is-centos]}" user="root" err-expect="1">
|
||||||
<exe-cmd>{[pg-cluster-start]}</exe-cmd>
|
<exe-cmd>{[pg-cluster-start]}</exe-cmd>
|
||||||
</execute>
|
</execute>
|
||||||
|
|
||||||
@ -1041,6 +1114,11 @@
|
|||||||
<exe-highlight-type>error</exe-highlight-type>
|
<exe-highlight-type>error</exe-highlight-type>
|
||||||
<exe-highlight>could not find the database system</exe-highlight>
|
<exe-highlight>could not find the database system</exe-highlight>
|
||||||
</execute>
|
</execute>
|
||||||
|
|
||||||
|
<execute if="{[os-type-is-centos7]}" user="root" output="y" err-expect="3">
|
||||||
|
<exe-cmd>{[pg-cluster-check]}</exe-cmd>
|
||||||
|
<exe-highlight>could not find the database system</exe-highlight>
|
||||||
|
</execute>
|
||||||
</execute-list>
|
</execute-list>
|
||||||
|
|
||||||
<p>To restore a backup of the <postgres/> cluster run <backrest/> with the <cmd>restore</cmd> command. The cluster needs to be stopped (in this case it is already stopped) and all files must be removed from the <postgres/> data directory.</p>
|
<p>To restore a backup of the <postgres/> cluster run <backrest/> with the <cmd>restore</cmd> command. The cluster needs to be stopped (in this case it is already stopped) and all files must be removed from the <postgres/> data directory.</p>
|
||||||
@ -1875,7 +1953,7 @@
|
|||||||
<exe-cmd-extra>-y 2>&1</exe-cmd-extra>
|
<exe-cmd-extra>-y 2>&1</exe-cmd-extra>
|
||||||
</execute>
|
</execute>
|
||||||
|
|
||||||
<execute if="{[os-type-is-centos6]}" user="root" pre="y">
|
<execute if="{[os-type-is-centos]}" user="root" pre="y">
|
||||||
<exe-cmd>yum install perl-XML-LibXML perl-IO-Socket-SSL</exe-cmd>
|
<exe-cmd>yum install perl-XML-LibXML perl-IO-Socket-SSL</exe-cmd>
|
||||||
<exe-cmd-extra>-y 2>&1</exe-cmd-extra>
|
<exe-cmd-extra>-y 2>&1</exe-cmd-extra>
|
||||||
</execute>
|
</execute>
|
||||||
@ -2049,7 +2127,7 @@
|
|||||||
|
|
||||||
<p>A new host named <host>repository</host> is created to store the cluster backups.</p>
|
<p>A new host named <host>repository</host> is created to store the cluster backups.</p>
|
||||||
|
|
||||||
<host-add id="{[host-repo1-id]}" name="{[host-repo1]}" user="{[host-repo1-user]}" image="{[host-repo1-image]}" os="{[os-type]}" mount="{[host-repo1-mount]}"/>
|
<host-add id="{[host-repo1-id]}" name="{[host-repo1]}" user="{[host-repo1-user]}" image="{[host-repo1-image]}" os="{[os-type]}" mount="{[host-repo1-mount]}" option="{[host-option]}"/>
|
||||||
|
|
||||||
<p>The <user>{[br-user]}</user> user is created to own the <backrest/> repository. Any user can own the repository but it is best not to use <user>postgres</user> (if it exists) to avoid confusion.</p>
|
<p>The <user>{[br-user]}</user> user is created to own the <backrest/> repository. Any user can own the repository but it is best not to use <user>postgres</user> (if it exists) to avoid confusion.</p>
|
||||||
|
|
||||||
@ -2059,10 +2137,10 @@
|
|||||||
<execute if="{[os-type-is-debian]}" user="root">
|
<execute if="{[os-type-is-debian]}" user="root">
|
||||||
<exe-cmd>adduser --disabled-password --gecos "" {[br-user]}</exe-cmd>
|
<exe-cmd>adduser --disabled-password --gecos "" {[br-user]}</exe-cmd>
|
||||||
</execute>
|
</execute>
|
||||||
<execute if="{[os-type-is-centos6]}" user="root">
|
<execute if="{[os-type-is-centos]}" user="root">
|
||||||
<exe-cmd>groupadd {[br-group]}</exe-cmd>
|
<exe-cmd>groupadd {[br-group]}</exe-cmd>
|
||||||
</execute>
|
</execute>
|
||||||
<execute if="{[os-type-is-centos6]}" user="root">
|
<execute if="{[os-type-is-centos]}" user="root">
|
||||||
<exe-cmd>adduser -g{[br-group]} -n {[br-user]}</exe-cmd>
|
<exe-cmd>adduser -g{[br-group]} -n {[br-user]}</exe-cmd>
|
||||||
</execute>
|
</execute>
|
||||||
</execute-list>
|
</execute-list>
|
||||||
@ -2391,7 +2469,7 @@
|
|||||||
|
|
||||||
<p>A new host named <host>{[host-pg2]}</host> is created to run the standby.</p>
|
<p>A new host named <host>{[host-pg2]}</host> is created to run the standby.</p>
|
||||||
|
|
||||||
<host-add id="{[host-pg2-id]}" name="{[host-pg2]}" user="{[host-pg2-user]}" image="{[host-pg2-image]}" os="{[os-type]}" mount="{[host-pg2-mount]}"/>
|
<host-add id="{[host-pg2-id]}" name="{[host-pg2]}" user="{[host-pg2-user]}" image="{[host-pg2-image]}" os="{[os-type]}" mount="{[host-pg2-mount]}" option="{[host-option]}"/>
|
||||||
|
|
||||||
<execute-list if="{[pg-version]} >= 11" host="{[host-pg2]}">
|
<execute-list if="{[pg-version]} >= 11" host="{[host-pg2]}">
|
||||||
<title>Create <user>{[br-user]}</user> user</title>
|
<title>Create <user>{[br-user]}</user> user</title>
|
||||||
@ -2399,7 +2477,7 @@
|
|||||||
<execute if="{[os-type-is-debian]}" user="root">
|
<execute if="{[os-type-is-debian]}" user="root">
|
||||||
<exe-cmd>adduser --ingroup {[pg-group]} --disabled-password --gecos "" {[br-user]}</exe-cmd>
|
<exe-cmd>adduser --ingroup {[pg-group]} --disabled-password --gecos "" {[br-user]}</exe-cmd>
|
||||||
</execute>
|
</execute>
|
||||||
<execute if="{[os-type-is-centos6]}" user="root">
|
<execute if="{[os-type-is-centos]}" user="root">
|
||||||
<exe-cmd>adduser -g{[pg-group]} -n {[br-user]}</exe-cmd>
|
<exe-cmd>adduser -g{[pg-group]} -n {[br-user]}</exe-cmd>
|
||||||
</execute>
|
</execute>
|
||||||
</execute-list>
|
</execute-list>
|
||||||
@ -2466,9 +2544,9 @@
|
|||||||
</execute>
|
</execute>
|
||||||
</execute-list>
|
</execute-list>
|
||||||
|
|
||||||
<p if="{[os-type-is-centos6]}">Create the path where <postgres/> will be restored.</p>
|
<p if="{[os-type-is-centos]}">Create the path where <postgres/> will be restored.</p>
|
||||||
|
|
||||||
<execute-list if="{[os-type-is-centos6]}" host="{[host-pg2]}">
|
<execute-list if="{[os-type-is-centos]}" host="{[host-pg2]}">
|
||||||
<title>Create <postgres/> path</title>
|
<title>Create <postgres/> path</title>
|
||||||
|
|
||||||
<execute user="postgres">
|
<execute user="postgres">
|
||||||
@ -2487,7 +2565,7 @@
|
|||||||
<exe-cmd>{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} {[dash]}-delta restore</exe-cmd>
|
<exe-cmd>{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} {[dash]}-delta restore</exe-cmd>
|
||||||
</execute>
|
</execute>
|
||||||
|
|
||||||
<execute user="postgres" if="{[os-type-is-centos6]}">
|
<execute user="postgres" if="{[os-type-is-centos]}">
|
||||||
<exe-cmd>{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} restore</exe-cmd>
|
<exe-cmd>{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} restore</exe-cmd>
|
||||||
</execute>
|
</execute>
|
||||||
|
|
||||||
@ -2683,9 +2761,9 @@
|
|||||||
</execute>
|
</execute>
|
||||||
</execute-list>
|
</execute-list>
|
||||||
|
|
||||||
<p if="{[os-type-is-centos6]}">By default {[user-guide-os]} stores the <file>postgresql.conf</file> file in the <postgres/> data directory. That means the change made to <file>postgresql.conf</file> was overwritten by the last restore and the <pg-option>hot_standby</pg-option> setting must be enabled again. Other solutions to this problem are to store the <file>postgresql.conf</file> file elsewhere or to enable the <pg-option>hot_standby</pg-option> setting on the <host>{[host-pg1]}</host> host where it will be ignored.</p>
|
<p if="{[os-type-is-centos]}">By default {[user-guide-os]} stores the <file>postgresql.conf</file> file in the <postgres/> data directory. That means the change made to <file>postgresql.conf</file> was overwritten by the last restore and the <pg-option>hot_standby</pg-option> setting must be enabled again. Other solutions to this problem are to store the <file>postgresql.conf</file> file elsewhere or to enable the <pg-option>hot_standby</pg-option> setting on the <host>{[host-pg1]}</host> host where it will be ignored.</p>
|
||||||
|
|
||||||
<postgres-config host="{[host-pg2]}" if="{[os-type-is-centos6]}" file="{[postgres-config-demo]}">
|
<postgres-config host="{[host-pg2]}" if="{[os-type-is-centos]}" file="{[postgres-config-demo]}">
|
||||||
<title>Enable <pg-option>hot_standby</pg-option></title>
|
<title>Enable <pg-option>hot_standby</pg-option></title>
|
||||||
|
|
||||||
<postgres-config-option key="hot_standby">on</postgres-config-option>
|
<postgres-config-option key="hot_standby">on</postgres-config-option>
|
||||||
@ -2987,7 +3065,7 @@
|
|||||||
<exe-highlight>Upgrade Complete</exe-highlight>
|
<exe-highlight>Upgrade Complete</exe-highlight>
|
||||||
</execute>
|
</execute>
|
||||||
|
|
||||||
<execute user="postgres" output="y" if="{[os-type-is-centos6]}">
|
<execute user="postgres" output="y" if="{[os-type-is-centos]}">
|
||||||
<exe-cmd>sh -c 'cd /var/lib/pgsql &&
|
<exe-cmd>sh -c 'cd /var/lib/pgsql &&
|
||||||
/usr/pgsql-{[pg-version-upgrade]}/bin/pg_upgrade
|
/usr/pgsql-{[pg-version-upgrade]}/bin/pg_upgrade
|
||||||
{[dash]}-old-bindir=/usr/pgsql-{[pg-version]}/bin
|
{[dash]}-old-bindir=/usr/pgsql-{[pg-version]}/bin
|
||||||
@ -3092,7 +3170,7 @@
|
|||||||
<exe-cmd>pg_dropcluster {[pg-version]} {[postgres-cluster-demo]}</exe-cmd>
|
<exe-cmd>pg_dropcluster {[pg-version]} {[postgres-cluster-demo]}</exe-cmd>
|
||||||
</execute>
|
</execute>
|
||||||
|
|
||||||
<execute if="{[os-type-is-centos6]}" user="root">
|
<execute if="{[os-type-is-centos]}" user="root">
|
||||||
<exe-cmd>rm -rf {[pg-path]}</exe-cmd>
|
<exe-cmd>rm -rf {[pg-path]}</exe-cmd>
|
||||||
</execute>
|
</execute>
|
||||||
</execute-list>
|
</execute-list>
|
||||||
@ -3106,11 +3184,11 @@
|
|||||||
<exe-cmd>pg_dropcluster {[pg-version]} {[postgres-cluster-demo]}</exe-cmd>
|
<exe-cmd>pg_dropcluster {[pg-version]} {[postgres-cluster-demo]}</exe-cmd>
|
||||||
</execute>
|
</execute>
|
||||||
|
|
||||||
<execute if="{[os-type-is-centos6]}" user="root">
|
<execute if="{[os-type-is-centos]}" user="root">
|
||||||
<exe-cmd>rm -rf {[pg-path]}</exe-cmd>
|
<exe-cmd>rm -rf {[pg-path]}</exe-cmd>
|
||||||
</execute>
|
</execute>
|
||||||
|
|
||||||
<execute user="postgres" if="{[os-type-is-centos6]}">
|
<execute user="postgres" if="{[os-type-is-centos]}">
|
||||||
<exe-cmd>
|
<exe-cmd>
|
||||||
mkdir -p -m 700 {[pg-bin-upgrade-path]}
|
mkdir -p -m 700 {[pg-bin-upgrade-path]}
|
||||||
</exe-cmd>
|
</exe-cmd>
|
||||||
@ -3148,7 +3226,7 @@
|
|||||||
<exe-cmd>{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} {[dash]}-delta restore</exe-cmd>
|
<exe-cmd>{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} {[dash]}-delta restore</exe-cmd>
|
||||||
</execute>
|
</execute>
|
||||||
|
|
||||||
<execute user="postgres" if="{[os-type-is-centos6]}">
|
<execute user="postgres" if="{[os-type-is-centos]}">
|
||||||
<exe-cmd>{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} restore</exe-cmd>
|
<exe-cmd>{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} restore</exe-cmd>
|
||||||
</execute>
|
</execute>
|
||||||
</execute-list>
|
</execute-list>
|
||||||
|
Reference in New Issue
Block a user