@@ -529,14 +529,14 @@ doc/src/sgml/pgprobackup.sgml
529
529
</step >
530
530
<step id =" pbk-init-the-backup-catalog" >
531
531
<para >Initialize the backup catalog:</para >
532
- <programlisting >
532
+ <programlisting id = " pbk-init-the-backup-catalog-listing " >
533
533
backup_user@backup_host:~$ pg_probackup-16 init -B /mnt/backups
534
534
INFO: Backup catalog '/mnt/backups' successfully initialized
535
535
</programlisting >
536
536
</step >
537
537
<step id =" pbk-add-instance-to-backup-catalog" >
538
538
<para >Add a backup instance called <literal >mydb</literal > to the backup catalog:</para >
539
- <programlisting >
539
+ <programlisting id = " pbk-add-instance-to-backup-catalog-listing " >
540
540
backup_user@backup_host:~$ pg_probackup-16 add-instance \
541
541
-B /mnt/backups \
542
542
-D /var/lib/postgresql/16/main \
@@ -548,7 +548,7 @@ INFO: Instance 'mydb' successfully initialized
548
548
</step >
549
549
<step id =" pbk-make-full-backup" >
550
550
<para >Make a FULL backup:</para >
551
- <programlisting >
551
+ <programlisting id = " pbk-make-full-backup-listing " >
552
552
backup_user@backup_host:~$ pg_probackup-16 backup \
553
553
-B /mnt/backups \
554
554
-b FULL \
@@ -580,7 +580,7 @@ INFO: Backup S6OBFN completed
580
580
</step >
581
581
<step id =" pbk-list-backups" >
582
582
<para >List the backups of the instance:</para >
583
- <programlisting >
583
+ <programlisting id = " pbk-list-backups-listing " >
584
584
backup_user@backup_host:~$ pg_probackup-16 show -B /mnt/backups --instance=mydb
585
585
================================================================================================================================
586
586
Instance Version ID Recovery Time Mode WAL Mode TLI Time Data WAL Zratio Start LSN Stop LSN Status
@@ -590,7 +590,7 @@ backup_user@backup_host:~$ pg_probackup-16 show -B /mnt/backups --instance=mydb
590
590
</step >
591
591
<step id =" pbk-make-incremental-backup-in-delta-mode" >
592
592
<para >Make an incremental backup in the DELTA mode:</para >
593
- <programlisting >
593
+ <programlisting id = " pbk-make-incremental-backup-in-delta-mode-listing " >
594
594
backup_user@backup_host:~$ pg_probackup-16 backup \
595
595
-B /mnt/backups \
596
596
-b delta \
@@ -625,7 +625,7 @@ INFO: Backup S6OBLG completed
625
625
<step id =" pbk-save-config-parameters" >
626
626
<para >Add or modify some parameters in the <application >pg_probackup</application >
627
627
configuration file, so that you do not have to specify them each time on the command line:</para >
628
- <programlisting >
628
+ <programlisting id = " pbk-save-config-parameters-listing " >
629
629
backup_user@backup_host:~$ pg_probackup-16 set-config \
630
630
-B /mnt/backups \
631
631
--instance=mydb \
@@ -637,7 +637,7 @@ backup_user@backup_host:~$ pg_probackup-16 set-config \
637
637
</step >
638
638
<step id =" pbk-print-instance-config" >
639
639
<para >Check the configuration of the instance:</para >
640
- <programlisting >
640
+ <programlisting id = " pbk-print-instance-config-listing " >
641
641
backup_user@backup_host:~$ pg_probackup-16 show-config -B /mnt/backups --instance=mydb
642
642
# Backup instance information
643
643
pgdata = /var/lib/postgresql/16/main
@@ -678,7 +678,7 @@ remote-user = postgres
678
678
<step id =" pbk-make-another-incremental-backup-in-delta-mode-using-saved-parameters" >
679
679
<para >Make another incremental backup in the DELTA mode, omitting
680
680
the parameters stored in the configuration file earlier:</para >
681
- <programlisting >
681
+ <programlisting id = " pbk-make-another-incremental-backup-in-delta-mode-using-saved-parameters-listing " >
682
682
backup_user@backup_host:~$ pg_probackup-16 backup -B /mnt/backups --instance=mydb -b delta --stream
683
683
INFO: Backup start, pg_probackup version: 2.5.13, instance: mydb, backup ID: S6OBQO, backup mode: DELTA, wal mode: STREAM, remote: true, compress-algorithm: none, compress-level: 1
684
684
INFO: Database backup start
@@ -704,7 +704,7 @@ INFO: Backup S6OBQO completed
704
704
</step >
705
705
<step id =" pbk-list-backups-again" >
706
706
<para >List the backups of the instance again:</para >
707
- <programlisting >
707
+ <programlisting id = " pbk-list-backups-again-listing " >
708
708
backup_user@backup_host:~$ pg_probackup-16 show -B /mnt/backups --instance=mydb
709
709
==================================================================================================================================
710
710
Instance Version ID Recovery Time Mode WAL Mode TLI Time Data WAL Zratio Start LSN Stop LSN Status
@@ -716,7 +716,7 @@ backup_user@backup_host:~$ pg_probackup-16 show -B /mnt/backups --instance=mydb
716
716
</step >
717
717
<step id =" pbk-quickstart-restore" >
718
718
<para >Restore the data from the latest available backup to an arbitrary location:</para >
719
- <programlisting >
719
+ <programlisting id = " pbk-quickstart-restore-listing " >
720
720
backup_user@backup_host:~$ pg_probackup-16 restore -B /mnt/backups -D /var/lib/postgresql/16/staging --instance=mydb
721
721
INFO: Validating parents for backup S6OBQO
722
722
INFO: Validating backup S6OBFN
@@ -2110,7 +2110,7 @@ pg_probackup validate -B <replaceable>backup_dir</replaceable> --instance <repla
2110
2110
from a backup copy with the <literal >PT8XFX</literal > backup ID up to the
2111
2111
specified timestamp, run this command:
2112
2112
</para >
2113
- <programlisting >
2113
+ <programlisting id = " pbk-validating-backups-listing " >
2114
2114
pg_probackup validate -B <replaceable >backup_dir</replaceable > --instance <replaceable >instance_name</replaceable > -i PT8XFX --recovery-target-time="2017-05-18 14:18:11+03"
2115
2115
</programlisting >
2116
2116
<para >
@@ -2305,7 +2305,7 @@ pg_probackup restore -B <replaceable>backup_dir</replaceable> --instance <replac
2305
2305
Suppose you want to return an old master as replica after switchover
2306
2306
using incremental restore in LSN mode:
2307
2307
</para >
2308
- <programlisting >
2308
+ <programlisting id = " pbk-incremental-restore-listing " >
2309
2309
=============================================================================================================================================
2310
2310
Instance Version ID Recovery Time Mode WAL Mode TLI Time Data WAL Zratio Start LSN Stop LSN Status
2311
2311
=============================================================================================================================================
@@ -2788,7 +2788,7 @@ pg_probackup show -B <replaceable>backup_dir</replaceable>
2788
2788
<application >pg_probackup</application > displays the list of all the available backups.
2789
2789
For example:
2790
2790
</para >
2791
- <programlisting >
2791
+ <programlisting id = " pbk-viewing-backup-info-listing-1 " >
2792
2792
BACKUP INSTANCE 'node'
2793
2793
======================================================================================================================================
2794
2794
Instance Version ID Recovery time Mode WAL Mode TLI Time Data WAL Zratio Start LSN Stop LSN Status
@@ -2952,7 +2952,7 @@ pg_probackup show -B <replaceable>backup_dir</replaceable> --instance <replaceab
2952
2952
<para >
2953
2953
The sample output is as follows:
2954
2954
</para >
2955
- <programlisting >
2955
+ <programlisting id = " pbk-viewing-backup-info-listing-2 " >
2956
2956
#Configuration
2957
2957
backup-mode = FULL
2958
2958
stream = false
@@ -3096,7 +3096,7 @@ pg_probackup show -B <replaceable>backup_dir</replaceable> --instance <replaceab
3096
3096
<para >
3097
3097
The sample output is as follows:
3098
3098
</para >
3099
- <programlisting >
3099
+ <programlisting id = " pbk-viewing-backup-info-listing-3 " >
3100
3100
[
3101
3101
{
3102
3102
"instance": "node",
@@ -3145,7 +3145,7 @@ pg_probackup show -B <replaceable>backup_dir</replaceable> [--instance <replacea
3145
3145
<application >pg_probackup</application > displays the list of all the available WAL files
3146
3146
grouped by timelines. For example:
3147
3147
</para >
3148
- <programlisting >
3148
+ <programlisting id = " pbk-viewing-wal-archive-information-listing-1 " >
3149
3149
ARCHIVE INSTANCE 'node'
3150
3150
===================================================================================================================================
3151
3151
TLI Parent TLI Switchpoint Min Segno Max Segno N segments Size Zratio N backups Status
@@ -3243,7 +3243,7 @@ pg_probackup show -B <replaceable>backup_dir</replaceable> [--instance <replacea
3243
3243
<para >
3244
3244
The sample output is as follows:
3245
3245
</para >
3246
- <programlisting >
3246
+ <programlisting id = " pbk-viewing-wal-archive-information-listing-2 " >
3247
3247
[
3248
3248
{
3249
3249
"instance": "replica",
@@ -3599,7 +3599,7 @@ pg_probackup delete -B <replaceable>backup_dir</replaceable> --instance <replace
3599
3599
to <literal >7</literal >, and you have the following backups
3600
3600
available on April 10, 2019:
3601
3601
</para >
3602
- <programlisting >
3602
+ <programlisting id = " pbk-retention-policy-listing-1 " >
3603
3603
BACKUP INSTANCE 'node'
3604
3604
===================================================================================================================================
3605
3605
Instance Version ID Recovery time Mode WAL TLI Time Data WAL Zratio Start LSN Stop LSN Status
@@ -3613,25 +3613,25 @@ BACKUP INSTANCE 'node'
3613
3613
node 10 P7XDFT 2019-03-29 05:26:25+03 FULL STREAM 1/0 11s 200MB 16MB 1.0 0/D000028 0/D000198 OK
3614
3614
</programlisting >
3615
3615
<para >
3616
- Even though <literal >P7XDHB</literal > and <literal >P7XDHU</literal > backups are outside the
3616
+ Even though <literal id = " pbk-retention-policy-backup2-1 " >P7XDHB</literal > and <literal id = " pbk-retention-policy-backup3-1 " >P7XDHU</literal > backups are outside the
3617
3617
retention window, they cannot be removed as it invalidates the
3618
- succeeding incremental backups <literal >P7XDJA</literal > and <literal >P7XDQV</literal > that are
3618
+ succeeding incremental backups <literal id = " pbk-retention-policy-backup4-1 " >P7XDJA</literal > and <literal id = " pbk-retention-policy-backup5 " >P7XDQV</literal > that are
3619
3619
still required, so, if you run the
3620
3620
<xref linkend =" pbk-delete" /> command with the
3621
- <option >--delete-expired</option > flag, only the <literal >P7XDFT</literal > full
3621
+ <option >--delete-expired</option > flag, only the <literal id = " pbk-retention-policy-backup1 " >P7XDFT</literal > full
3622
3622
backup will be removed.
3623
3623
</para >
3624
3624
<para >
3625
- With the <option >--merge-expired</option > option, the <literal >P7XDJA</literal >
3626
- backup is merged with the underlying <literal >P7XDHU</literal > and <literal >P7XDHB</literal > backups
3625
+ With the <option >--merge-expired</option > option, the <literal id = " pbk-retention-policy-backup4-2 " >P7XDJA</literal >
3626
+ backup is merged with the underlying <literal id = " pbk-retention-policy-backup3-2 " >P7XDHU</literal > and <literal id = " pbk-retention-policy-backup2-2 " >P7XDHB</literal > backups
3627
3627
and becomes a full one, so there is no need to keep these
3628
3628
expired backups anymore:
3629
3629
</para >
3630
3630
<programlisting >
3631
3631
pg_probackup delete -B <replaceable >backup_dir</replaceable > --instance <replaceable >node</replaceable > --delete-expired --merge-expired
3632
3632
pg_probackup show -B <replaceable >backup_dir</replaceable >
3633
3633
</programlisting >
3634
- <programlisting >
3634
+ <programlisting id = " pbk-retention-policy-listing-2 " >
3635
3635
BACKUP INSTANCE 'node'
3636
3636
==================================================================================================================================
3637
3637
Instance Version ID Recovery time Mode WAL TLI Time Data WAL Zratio Start LSN Stop LSN Status
@@ -3688,7 +3688,7 @@ pg_probackup show -B <replaceable>backup_dir</replaceable> --instance <replaceab
3688
3688
<para >
3689
3689
If the backup is pinned, it has the <literal >expire-time</literal >
3690
3690
attribute that displays its expiration time:
3691
- <programlisting >
3691
+ <programlisting id = " pbk-backup-pinning-listing " >
3692
3692
...
3693
3693
recovery-time = '2017-05-16 12:57:31'
3694
3694
expire-time = '2020-01-01 00:00:00+03'
@@ -3766,7 +3766,7 @@ pg_probackup set-backup -B <replaceable>backup_dir</replaceable> --instance <rep
3766
3766
<programlisting >
3767
3767
pg_probackup show -B <replaceable >backup_dir</replaceable > --instance <replaceable >node</replaceable >
3768
3768
</programlisting >
3769
- <programlisting >
3769
+ <programlisting id = " pbk-wal-archive-retention-policy-listing-1 " >
3770
3770
BACKUP INSTANCE 'node'
3771
3771
====================================================================================================================================
3772
3772
Instance Version ID Recovery Time Mode WAL Mode TLI Time Data WAL Zratio Start LSN Stop LSN Status
@@ -3786,7 +3786,7 @@ BACKUP INSTANCE 'node'
3786
3786
<programlisting >
3787
3787
pg_probackup show -B <replaceable >backup_dir</replaceable > --instance node --archive
3788
3788
</programlisting >
3789
- <programlisting >
3789
+ <programlisting id = " pbk-wal-archive-retention-policy-listing-2 " >
3790
3790
ARCHIVE INSTANCE 'node'
3791
3791
===============================================================================================================================
3792
3792
TLI Parent TLI Switchpoint Min Segno Max Segno N segments Size Zratio N backups Status
@@ -3800,7 +3800,7 @@ ARCHIVE INSTANCE 'node'
3800
3800
<programlisting >
3801
3801
pg_probackup delete -B <replaceable >backup_dir</replaceable > --instance node --delete-wal
3802
3802
</programlisting >
3803
- <programlisting >
3803
+ <programlisting id = " pbk-wal-archive-retention-policy-listing-3 " >
3804
3804
ARCHIVE INSTANCE 'node'
3805
3805
===============================================================================================================================
3806
3806
TLI Parent TLI Switchpoint Min Segno Max Segno N segments Size Zratio N backups Status
@@ -3815,7 +3815,7 @@ ARCHIVE INSTANCE 'node'
3815
3815
<programlisting >
3816
3816
pg_probackup delete -B <replaceable >backup_dir</replaceable > --instance node --delete-wal --wal-depth=1
3817
3817
</programlisting >
3818
- <programlisting >
3818
+ <programlisting id = " pbk-wal-archive-retention-policy-listing-4 " >
3819
3819
ARCHIVE INSTANCE 'node'
3820
3820
================================================================================================================================
3821
3821
TLI Parent TLI Switchpoint Min Segno Max Segno N segments Size Zratio N backups Status
@@ -3829,7 +3829,7 @@ ARCHIVE INSTANCE 'node'
3829
3829
<programlisting >
3830
3830
pg_probackup backup -B <replaceable >backup_dir</replaceable > --instance node -b DELTA --wal-depth=1 --delete-wal
3831
3831
</programlisting >
3832
- <programlisting >
3832
+ <programlisting id = " pbk-wal-archive-retention-policy-listing-5 " >
3833
3833
ARCHIVE INSTANCE 'node'
3834
3834
===============================================================================================================================
3835
3835
TLI Parent TLI Switchpoint Min Segno Max Segno N segments Size Zratio N backups Status
0 commit comments