Skip to content

Commit 3129369

Browse files
author
Liudmila Mantrova
committed
DOC: fixes for PGPRO-3413
1 parent 95459a8 commit 3129369

File tree

1 file changed

+53
-26
lines changed

1 file changed

+53
-26
lines changed

doc/pgprobackup.xml

Lines changed: 53 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1625,6 +1625,44 @@ pg_probackup restore -B <replaceable>backup_dir</replaceable> --instance <replac
16251625
</para>
16261626
</listitem>
16271627
</itemizedlist>
1628+
1629+
<para>
1630+
Once the <literal>restore</literal> command is complete, start
1631+
the database service.
1632+
</para>
1633+
1634+
<para>
1635+
If you restore <link linkend="pbk-archive-mode">ARCHIVE</link> backups,
1636+
perform <link linkend="pbk-performing-point-in-time-pitr-recovery">PITR</link>,
1637+
or specify the <literal>--restore-as-replica</literal> option with the
1638+
<literal>restore</literal> command to set up a standby server,
1639+
<application>pg_probackup</application> creates a recovery configuration
1640+
file once all data files are copied into the target directory. This file
1641+
includes the minimal settings required for recovery, except for the password in the
1642+
<ulink url="https://postgrespro.com/docs/postgresql/current/runtime-config-replication.html#GUC-PRIMARY-CONNINFO">primary_conninfo</ulink>
1643+
parameter; you have to add the password manually, if required.
1644+
For <productname>PostgreSQL</productname> 11 or lower,
1645+
recovery settings are written into the <filename>recovery.conf</filename>
1646+
file. Starting from <productname>PostgreSQL</productname> 12,
1647+
<application>pg_probackup</application> writes these settings into
1648+
the <filename>probackup_recovery.conf</filename> file in the data
1649+
directory, and then includes them into the
1650+
<filename>postgresql.auto.conf</filename> when the cluster is
1651+
is started.
1652+
</para>
1653+
1654+
<para>
1655+
If you are restoring a STREAM backup, the restore is complete
1656+
at once, with the cluster returned to a self-consistent state at
1657+
the point when the backup was taken. For ARCHIVE backups,
1658+
<productname>PostgreSQL</productname> replays all available archived WAL
1659+
segments, so the cluster is restored to the latest state possible
1660+
within the current timeline. You can change this behavior by using the
1661+
<link linkend="pbk-recovery-target-opts">recovery target
1662+
options</link> with the <literal>restore</literal> command,
1663+
as explained in <xref linkend="pbk-performing-point-in-time-pitr-recovery"/>.
1664+
</para>
1665+
16281666
<para>
16291667
If the cluster to restore contains tablespaces, <application>pg_probackup</application>
16301668
restores them to their original location by default. To restore
@@ -1644,28 +1682,10 @@ pg_probackup restore -B <replaceable>backup_dir</replaceable> --instance <replac
16441682
<programlisting>
16451683
pg_probackup restore -B <replaceable>backup_dir</replaceable> --instance <replaceable>instance_name</replaceable> -D <replaceable>data_dir</replaceable> -j 4 -i <replaceable>backup_id</replaceable> -T tablespace1_dir=<replaceable>tablespace1_newdir</replaceable> -T tablespace2_dir=<replaceable>tablespace2_newdir</replaceable>
16461684
</programlisting>
1685+
16471686
<para>
1648-
Once the restore command is complete, start the database
1649-
service.
1650-
</para>
1651-
<para>
1652-
If you are restoring a STREAM backup, the restore is complete
1653-
at once, with the cluster returned to a self-consistent state at
1654-
the point when the backup was taken. For ARCHIVE backups,
1655-
<productname>PostgreSQL</productname> replays all available archived WAL segments, so the
1656-
cluster is restored to the latest state possible. You can change
1657-
this behavior by using the
1658-
<link linkend="pbk-recovery-target-opts">recovery target
1659-
options</link> with the <literal>restore</literal> command. Note
1660-
that using the <link linkend="pbk-recovery-target-opts">recovery
1661-
target options</link> when restoring STREAM backup is possible
1662-
if the WAL archive is available at least starting from the time
1663-
the STREAM backup was taken.
1664-
</para>
1665-
<para>
1666-
To restore the cluster on a remote host, see the section
1667-
<link linkend="pbk-remote-backup">Using
1668-
<application>pg_probackup</application> in the Remote Mode</link>.
1687+
To restore the cluster on a remote host, follow the instructions in
1688+
<xref linkend="pbk-remote-backup"/>.
16691689
</para>
16701690
<note>
16711691
<para>
@@ -1744,15 +1764,18 @@ pg_probackup restore -B <replaceable>backup_dir</replaceable> --instance <replac
17441764
cluster to its state at an arbitrary point in time (recovery
17451765
target) using <link linkend="pbk-recovery-target-opts">recovery
17461766
target options</link> with the
1747-
<xref linkend="pbk-restore"/> and
1748-
<xref linkend="pbk-validate"/> commands.
1767+
<xref linkend="pbk-restore"/> command.
17491768
</para>
1769+
17501770
<para>
1771+
You can use both STREAM and ARCHIVE backups for point in time
1772+
recovery as long as the WAL archive is available at least starting
1773+
from the time the backup was taken.
17511774
If <option>-i</option>/<option>--backup-id</option> option is omitted,
17521775
<application>pg_probackup</application> automatically chooses the backup that is the
17531776
closest to the specified recovery target and starts the restore
17541777
process, otherwise <application>pg_probackup</application> will try to restore
1755-
<replaceable>backup_id</replaceable> to the specified recovery target.
1778+
the specified backup to the specified recovery target.
17561779
</para>
17571780
<itemizedlist>
17581781
<listitem>
@@ -3585,13 +3608,17 @@ pg_probackup restore -B <replaceable>backup_dir</replaceable> --instance <replac
35853608
<para>
35863609
Creates a minimal recovery configuration file to facilitate setting up a
35873610
standby server. If the replication connection requires a password,
3588-
you must specify the password manually as it is not included.
3611+
you must specify the password manually in the
3612+
<ulink url="https://postgrespro.com/docs/postgresql/current/runtime-config-replication.html#GUC-PRIMARY-CONNINFO">primary_conninfo</ulink>
3613+
parameter as it is not included.
35893614
For <productname>PostgreSQL</productname> 11 or lower,
35903615
recovery settings are written into the <filename>recovery.conf</filename>
35913616
file. Starting from <productname>PostgreSQL</productname> 12,
35923617
<application>pg_probackup</application> writes these settings into
35933618
the <filename>probackup_recovery.conf</filename> file in the data
3594-
directory.
3619+
directory, and then includes them into the
3620+
<filename>postgresql.auto.conf</filename> when the cluster is
3621+
is started.
35953622
</para>
35963623
</listitem>
35973624
</varlistentry>

0 commit comments

Comments
 (0)