@@ -165,7 +165,7 @@ doc/src/sgml/pgprobackup.sgml
165
165
To manage backup data, <application>pg_probackup</application> creates a
166
166
special <emphasis>backup catalog</emphasis>. This directory
167
167
stores all backup files with additional meta information, as
168
- well as <acronym>WAL</acronym> archives required for point-in-time recovery. To avoid
168
+ well as <acronym>WAL</acronym> archives required for <link linkend="continuous-archiving"> point-in-time recovery</link> . To avoid
169
169
conflicts, <application>pg_probackup</application> does not allow storing
170
170
backups for different clusters in a single backup catalog.
171
171
</para>
@@ -366,7 +366,7 @@ pg_probackup init -B <replaceable>backupdir</replaceable> -D <replaceable>datadi
366
366
</listitem>
367
367
</itemizedlist>
368
368
<para>
369
- The backup catalog must be accessible from the file
369
+ The backup catalog must belong to the file
370
370
system of the database server. The user launching
371
371
<application>pg_probackup</application> must have full access to the
372
372
contents of the backup catalog. If you specify the path to the
@@ -416,7 +416,7 @@ pg_probackup init -B <replaceable>backupdir</replaceable> -D <replaceable>datadi
416
416
<listitem>
417
417
<para>
418
418
Create the <literal>backup</literal> role with the
419
- <link linkend="role-attributes"><literal>REPLICATION</literal> privilege </link>.
419
+ <link linkend="role-attributes"><literal>LOGIN</literal> and <literal> REPLICATION</literal> privileges </link>.
420
420
</para>
421
421
<programlisting>
422
422
CREATE ROLE backup WITH LOGIN REPLICATION;
@@ -436,14 +436,14 @@ CREATE ROLE backup WITH LOGIN REPLICATION;
436
436
<itemizedlist spacing="compact">
437
437
<listitem>
438
438
<para>
439
- Make sure the <literal >max_wal_senders</literal >
439
+ Make sure the <varname >max_wal_senders</varname >
440
440
parameter is set high enough to leave at least one
441
441
session available for the backup process.
442
442
</para>
443
443
</listitem>
444
444
<listitem>
445
445
<para>
446
- Set the <literal >wal_level</literal > parameter to be
446
+ Set the <varname >wal_level</varname > parameter to be
447
447
<literal>replica</literal> or higher.
448
448
</para>
449
449
</listitem>
@@ -495,14 +495,14 @@ CREATE ROLE backup WITH LOGIN;
495
495
<listitem>
496
496
<para>
497
497
Set <literal>archive_mode</literal> to
498
- <literal>'on' </literal>.
498
+ <literal>on </literal>.
499
499
</para>
500
500
</listitem>
501
501
<listitem>
502
502
<para>
503
- Set <literal >archive_command</literal > to
504
- <literal>' test ! -f backup\_dir /wal/%f && cp %p backup\_dir /wal/%f'; </literal>
505
- where <literal >backup_dir</literal > is the initialized
503
+ Set <varname >archive_command</varname > to
504
+ <literal>test ! -f backup_dir /wal/%f && cp %p backup_dir /wal/%f</literal>
505
+ where <replaceable >backup_dir</replaceable > is the initialized
506
506
backup catalog.
507
507
</para>
508
508
</listitem>
@@ -543,8 +543,8 @@ GRANT EXECUTE ON FUNCTION txid_snapshot_xmax(txid_snapshot) TO backup;
543
543
<itemizedlist spacing="compact">
544
544
<listitem>
545
545
<para>
546
- Set the <literal >max_wal_senders</literal > and
547
- <literal >hot_standby</literal > parameters in
546
+ Set the <varname >max_wal_senders</varname > and
547
+ <varname >hot_standby</varname > parameters in
548
548
<filename>postgresql.conf</filename>.
549
549
</para>
550
550
</listitem>
@@ -559,7 +559,7 @@ GRANT EXECUTE ON FUNCTION txid_snapshot_xmax(txid_snapshot) TO backup;
559
559
<listitem>
560
560
<para>
561
561
On the master server, enable
562
- <literal >full_page_writes</literal > in
562
+ <varname >full_page_writes</varname > in
563
563
<filename>postgresql.conf</filename>.
564
564
</para>
565
565
</listitem>
@@ -578,10 +578,10 @@ GRANT EXECUTE ON FUNCTION txid_snapshot_xmax(txid_snapshot) TO backup;
578
578
<listitem>
579
579
<para>All <acronym>WAL</acronym> records required
580
580
for the backup must contain sufficient full-page writes. This
581
- requires you to enable <literal >full_page_writes</literal > on
581
+ requires you to enable <varname >full_page_writes</varname > on
582
582
the master, and not to use a tool like
583
- <literal >pg_compresslog</literal > as
584
- <literal >archive_command</literal > to remove full-page writes
583
+ <application >pg_compresslog</application > as
584
+ <varname >archive_command</varname > to remove full-page writes
585
585
from <acronym>WAL</acronym> files.
586
586
</para>
587
587
</listitem>
@@ -598,7 +598,7 @@ GRANT EXECUTE ON FUNCTION txid_snapshot_xmax(txid_snapshot) TO backup;
598
598
<listitem>
599
599
<para>
600
600
In <filename>postgresql.conf</filename>, set
601
- <literal >ptrack_enable</literal > to <literal>'on' </literal>.
601
+ <varname >ptrack_enable</varname > to <literal>on </literal>.
602
602
</para>
603
603
</listitem>
604
604
<listitem>
@@ -699,7 +699,7 @@ pg_probackup backup -B <replaceable>backupdir</replaceable> -b <replaceable>back
699
699
[-C] [--stream [-S <replaceable>slot-name</replaceable>]] [--backup-pg-log]
700
700
-archive-timeout=<replaceable>timeout</replaceable>] [--delete-expired]
701
701
[-d <replaceable>dbname</replaceable>] [-h <replaceable>host</replaceable>] [-p <replaceable>port</replaceable>] [-U <replaceable>username</replaceable>] [-w]
702
- [-j <replaceable>num-threads </replaceable>][--progress] [-q] [-v]
702
+ [-j <replaceable>num_threads </replaceable>][--progress] [-q] [-v]
703
703
</programlisting>
704
704
<para>
705
705
Creates a backup copy of the <productname>&productname;</productname> instance.
@@ -724,7 +724,7 @@ pg_probackup backup -B <replaceable>backupdir</replaceable> -b <replaceable>back
724
724
pg_probackup restore -B <replaceable>backupdir</replaceable>
725
725
[-D <replaceable>datadir</replaceable>]
726
726
[ -i <replaceable>backup_id</replaceable> | [{--time=<replaceable>time</replaceable> | --xid=<replaceable>xid</replaceable> } [--inclusive=<replaceable>boolean</replaceable>]]][--timeline=<replaceable>timeline</replaceable>] [-T OLDDIR=<replaceable>NEWDIR</replaceable>]
727
- [-j <replaceable>num-threads </replaceable>] [--progress] [-q] [-v]
727
+ [-j <replaceable>num_threads </replaceable>] [--progress] [-q] [-v]
728
728
</programlisting>
729
729
<para>
730
730
Restores the <productname>&productname;</productname> instance from a backup copy
@@ -747,7 +747,7 @@ pg_probackup validate -B <replaceable>backupdir</replaceable>
747
747
[-D <replaceable>datadir</replaceable>]
748
748
[ -i <replaceable>backup_id</replaceable> | [{--time=<replaceable>time</replaceable> | --xid=<replaceable>xid</replaceable> } [--inclusive=<replaceable>boolean</replaceable>]]]
749
749
[--timeline=<replaceable>timeline</replaceable>]
750
- [-j <replaceable>num-threads </replaceable>] [--progress] [-q] [-v]
750
+ [-j <replaceable>num_threads </replaceable>] [--progress] [-q] [-v]
751
751
</programlisting>
752
752
<para>
753
753
Verifies that all files in the backup are present and not corrupted.
@@ -789,7 +789,7 @@ pg_probackup delete -B <replaceable>backupdir</replaceable> {-i <replaceable>bac
789
789
Deletes the specified backup files from the <replaceable>backupdir</replaceable> backup catalog:
790
790
<itemizedlist spacing="compact">
791
791
<listitem>
792
- <para>The <option>backup-id </option> option removes the specified backup copy.
792
+ <para>The <option>-i </option> option removes the specified backup copy.
793
793
</para>
794
794
</listitem>
795
795
<listitem>
@@ -815,7 +815,7 @@ pg_probackup delete -B <replaceable>backupdir</replaceable> {-i <replaceable>bac
815
815
pg_probackup version
816
816
</programlisting>
817
817
<para>
818
- Shows the current version of <application>pg_probackup</application>.
818
+ Prints <application>pg_probackup</application> version .
819
819
</para>
820
820
</listitem>
821
821
</varlistentry>
@@ -1304,7 +1304,7 @@ pg_probackup backup -b FULL --stream
1304
1304
Autonomous backups include all the <acronym>WAL</acronym> segments required to restore the
1305
1305
cluster to a consistent state at the time the backup was taken. To restore a cluster
1306
1306
from an incremental autonomous backup, <application>pg_probackup</application> still
1307
- requires a full backup and all the previous incremented backups.
1307
+ requires the full backup and all the incremental backups it depends on .
1308
1308
</para>
1309
1309
1310
1310
<para>
@@ -1356,10 +1356,10 @@ pg_probackup backup -b FULL --stream
1356
1356
</para>
1357
1357
<para>For example, to check that you can restore the
1358
1358
database cluster from a backup copy up to the specified
1359
- <literal >xid</literal > transaction ID, run this command:
1359
+ <replaceable >xid</replaceable > transaction ID, run this command:
1360
1360
</para>
1361
1361
<programlisting>
1362
- pg_probackup validate --xid=xid
1362
+ pg_probackup validate --xid=<replaceable> xid</replaceable>
1363
1363
</programlisting>
1364
1364
<para>
1365
1365
If validation completes successfully,
@@ -1438,7 +1438,7 @@ pg_probackup restore -D <replaceable>datadir</replaceable> -i <replaceable>backu
1438
1438
<xref linkend="recovery-target-inclusive"> parameter defines whether the recovery
1439
1439
target is included into the backup. You can explicitly include or
1440
1440
exclude the recovery target using the
1441
- <option>--inclusive=' <replaceable>boolean</replaceable>' </option> option.
1441
+ <option>--inclusive=<replaceable>boolean</replaceable></option> option.
1442
1442
</para>
1443
1443
<para>
1444
1444
To restore the cluster state at the exact time, specify the
@@ -1471,7 +1471,7 @@ pg_probackup restore --xid=687
1471
1471
tablespaces. For example:
1472
1472
</para>
1473
1473
<programlisting>
1474
- pg_probackup restore -D <replaceable>datadir</replaceable> -j 4 -i <replaceable>backup_id</replaceable> -T <replaceable>/tmp/tblspc1 </replaceable>=<replaceable>/tmp/tblspc1_new </replaceable> -T <replaceable>/tmp/tblspc2 </replaceable>=<replaceable>/tmp/tblspc2_new </replaceable>
1474
+ pg_probackup restore -D <replaceable>datadir</replaceable> -j 4 -i <replaceable>backup_id</replaceable> -T <replaceable>/tmp/tablespace1 </replaceable>=<replaceable>/tmp/tablespace1_new </replaceable> -T <replaceable>/tmp/tablespace2 </replaceable>=<replaceable>/tmp/tablespace2_new </replaceable>
1475
1475
</programlisting>
1476
1476
<para>
1477
1477
Once the <literal>restore</literal> command is complete, start the
@@ -1495,7 +1495,7 @@ pg_probackup restore -D <replaceable>datadir</replaceable> -j 4 -i <replaceable>
1495
1495
command line option. For example, to create a backup using four parallel threads, run:
1496
1496
<programlisting>
1497
1497
pg_probackup backup -b full -j 4
1498
- </programlisting>
1498
+ </programlisting>
1499
1499
</para>
1500
1500
1501
1501
<note>
@@ -1517,17 +1517,17 @@ pg_probackup backup -b full -j 4
1517
1517
<link linkend="pg-probackup-retention-opts">retention options</link> using the
1518
1518
<xref linkend="pg-probackup-set-config"> command:</para>
1519
1519
<programlisting>
1520
- pg_probackup set-config -B <replaceable>backupdir</replaceable> [<replaceable>connection-options </replaceable>] [<replaceable>retention-options </replaceable>]
1520
+ pg_probackup set-config -B <replaceable>backupdir</replaceable> [<replaceable>connection_options </replaceable>] [<replaceable>retention_options </replaceable>]
1521
1521
</programlisting>
1522
1522
<para>where:
1523
1523
<itemizedlist spacing="compact">
1524
1524
<listitem>
1525
- <para><replaceable>connection-options </replaceable> are:
1525
+ <para><replaceable>connection_options </replaceable> are:
1526
1526
[-d <replaceable>dbname</replaceable>] [-h <replaceable>host</replaceable>] [-p <replaceable>port</replaceable>] [-U <replaceable>username</replaceable>]
1527
1527
</para>
1528
1528
</listitem>
1529
1529
<listitem>
1530
- <para><replaceable>retention-options </replaceable> are:
1530
+ <para><replaceable>retention_options </replaceable> are:
1531
1531
[--retention-redundancy=<replaceable>redundancy</replaceable>]
1532
1532
[--retention-window=<replaceable>window</replaceable>]
1533
1533
</para>
@@ -1564,13 +1564,13 @@ If you define connection parameters in the <filename>pg_probackup.conf</filename
1564
1564
<itemizedlist spacing="compact">
1565
1565
<listitem><para>
1566
1566
<option>retention-redundancy</option> — specifies the number of full backup
1567
- copies to keep in the data directory .</para>
1567
+ copies to keep in the backup catalog .</para>
1568
1568
</listitem>
1569
- <listitem><para><option>retention-window</option> — defines the earliest point in time for which <application>pg_probackup</application> can complete the recovery. This option is set in the number of days from the current moment. For example, if <option>window</option>=7, <application>pg_probackup</application> must keep at least one full backup copy that is older than seven days, with all the corresponding <acronym>WAL</acronym> files.</para></listitem>
1569
+ <listitem><para><option>retention-window</option> — defines the earliest point in time for which <application>pg_probackup</application> can complete the recovery. This option is set in the number of days from the current moment. For example, if <option>retention- window</option>=7, <application>pg_probackup</application> must keep at least one full backup copy that is older than seven days, with all the corresponding <acronym>WAL</acronym> files.</para></listitem>
1570
1570
</itemizedlist>
1571
1571
<para>If both <option>retention-redundancy</option> and <option>retention-window</option>
1572
1572
options are set, <application>pg_probackup</application> keeps backup copies
1573
- that satisfy both conditions. For example, if you set <option>redundancy</option>=2 and <option>window</option>=7, <application>pg_probackup</application> cleans up the backup directory to keep only two full backup copies if at least one of them is older than seven days.
1573
+ that satisfy both conditions. For example, if you set <option>retention- redundancy</option>=2 and <option>retention- window</option>=7, <application>pg_probackup</application> cleans up the backup directory to keep only two full backup copies if at least one of them is older than seven days.
1574
1574
</para>
1575
1575
<para>
1576
1576
To clean up the backup catalog in accordance with retention policy, run:
@@ -1586,7 +1586,7 @@ pg_probackup delete --expired
1586
1586
Alternatively, you can configure backup retention policy
1587
1587
and use the <literal>--delete-expired</literal>
1588
1588
option together with the <literal>backup</literal> command to
1589
- remove the outdated backup copy once the new backup is created.</para>
1589
+ remove the outdated backup copies once the new backup is created.</para>
1590
1590
</refsect2>
1591
1591
</refsect1>
1592
1592
@@ -1647,7 +1647,7 @@ pg_probackup show
1647
1647
</para>
1648
1648
</listitem>
1649
1649
<listitem>
1650
- <para>Time — the time it took to peform the backup.
1650
+ <para>Time — the time it took to perform the backup.
1651
1651
</para>
1652
1652
</listitem>
1653
1653
<listitem>
@@ -1675,7 +1675,7 @@ pg_probackup show
1675
1675
To get more detailed information about the backup, run the <command>show</command> with the backup ID:
1676
1676
</para>
1677
1677
<programlisting>
1678
- pg_probackup show -i <replaceable>backup_id</replaceable>
1678
+ pg_probackup show -i <replaceable>backup_id</replaceable>
1679
1679
</programlisting>
1680
1680
<para>
1681
1681
The sample output is as follows:
@@ -1710,7 +1710,7 @@ status = OK
1710
1710
command:
1711
1711
</para>
1712
1712
<programlisting>
1713
- pg_probackup delete -i backup-id
1713
+ pg_probackup delete -i <replaceable>backup_id</replaceable>
1714
1714
</programlisting>
1715
1715
<para>
1716
1716
This command will delete the backup with the specified
@@ -1721,9 +1721,10 @@ status = OK
1721
1721
</para>
1722
1722
<note>
1723
1723
<para>
1724
- In this case the next <literal>PTRACK</literal> backup will not be correct as some
1725
- changes since the last retained backup will be lost. Either FULL
1726
- backup or incremental PAGE backup (given that all necessary WAL
1724
+ In this case, the next <literal>PTRACK</literal> backup will be incomplete as some
1725
+ changes since the last retained backup will be lost. Either a full
1726
+ backup or an incremental <literal>PAGE</literal> backup
1727
+ (if all the necessary <acronym>WAL</acronym>
1727
1728
files are still present in the archive) must be taken then.
1728
1729
</para>
1729
1730
</note>
@@ -1732,15 +1733,15 @@ status = OK
1732
1733
of the remaining backups, use the <literal>--wal</literal> option:
1733
1734
</para>
1734
1735
<programlisting>
1735
- pg_probackup delete --wal
1736
+ pg_probackup delete --wal
1736
1737
</programlisting>
1737
1738
<para>
1738
1739
To delete backups that are expired according to the current
1739
1740
retention policy, use the
1740
1741
<literal>--expired</literal> option:
1741
1742
</para>
1742
1743
<programlisting>
1743
- pg_probackup delete --expired
1744
+ pg_probackup delete --expired
1744
1745
</programlisting>
1745
1746
<para>For details, see <xref linkend="pg-probackup-retention-policy">.</para>
1746
1747
</refsect2>
0 commit comments