@@ -1625,6 +1625,44 @@ pg_probackup restore -B <replaceable>backup_dir</replaceable> --instance <replac
1625
1625
</para >
1626
1626
</listitem >
1627
1627
</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
+
1628
1666
<para >
1629
1667
If the cluster to restore contains tablespaces, <application >pg_probackup</application >
1630
1668
restores them to their original location by default. To restore
@@ -1644,28 +1682,10 @@ pg_probackup restore -B <replaceable>backup_dir</replaceable> --instance <replac
1644
1682
<programlisting >
1645
1683
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 >
1646
1684
</programlisting >
1685
+
1647
1686
<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" />.
1669
1689
</para >
1670
1690
<note >
1671
1691
<para >
@@ -1744,15 +1764,18 @@ pg_probackup restore -B <replaceable>backup_dir</replaceable> --instance <replac
1744
1764
cluster to its state at an arbitrary point in time (recovery
1745
1765
target) using <link linkend =" pbk-recovery-target-opts" >recovery
1746
1766
target options</link > with the
1747
- <xref linkend =" pbk-restore" /> and
1748
- <xref linkend =" pbk-validate" /> commands.
1767
+ <xref linkend =" pbk-restore" /> command.
1749
1768
</para >
1769
+
1750
1770
<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.
1751
1774
If <option >-i</option >/<option >--backup-id</option > option is omitted,
1752
1775
<application >pg_probackup</application > automatically chooses the backup that is the
1753
1776
closest to the specified recovery target and starts the restore
1754
1777
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.
1756
1779
</para >
1757
1780
<itemizedlist >
1758
1781
<listitem >
@@ -3585,13 +3608,17 @@ pg_probackup restore -B <replaceable>backup_dir</replaceable> --instance <replac
3585
3608
<para >
3586
3609
Creates a minimal recovery configuration file to facilitate setting up a
3587
3610
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.
3589
3614
For <productname >PostgreSQL</productname > 11 or lower,
3590
3615
recovery settings are written into the <filename >recovery.conf</filename >
3591
3616
file. Starting from <productname >PostgreSQL</productname > 12,
3592
3617
<application >pg_probackup</application > writes these settings into
3593
3618
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.
3595
3622
</para >
3596
3623
</listitem >
3597
3624
</varlistentry >
0 commit comments