You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -1124,7 +1125,11 @@ Most fields are consistent with plain format, with some exceptions:
1124
1125
- DEGRADED timelines contain 'lost-segments' array with information about intervals of missing segments. In OK timelines 'lost-segments' array is empty.
1125
1126
- 'N backups' attribute is replaced with 'backups' array containing backups belonging to the timeline. If timeline has no backups, then 'backups' array is empty.
1126
1127
1127
-
### Configuring Backup Retention Policy
1128
+
### Configuring Retention Policy
1129
+
1130
+
With pg_probackup, you can set retention policies for backups and WAL archive. All policies can be combined together in any way.
1131
+
1132
+
#### Backup Retention Policy
1128
1133
1129
1134
By default, all backup copies created with pg_probackup are stored in the specified backup catalog. To save disk space, you can configure retention policy and periodically clean up redundant backup copies accordingly.
1130
1135
@@ -1162,16 +1167,16 @@ Suppose you have backed up the *node* instance in the *backup_dir* directory, wi
node 10 P7XDHB 2019-04-01 05:27:15+03 FULL STREAM 1/0 11s200MB 16MB1.0 0/F000028 0/F000198 OK
1179
+
node 10 P7XDFT 2019-03-29 05:26:25+03 FULL STREAM 1/0 11s200MB 16MB1.0 0/D000028 0/D000198 OK
1175
1180
```
1176
1181
1177
1182
Even though P7XDHB and P7XDHU backups are outside the retention window, they cannot be removed as it invalidates the succeeding incremental backups P7XDJA and P7XDQV that are still required, so, if you run the [delete](#delete) command with the `--delete-expired` flag, only the P7XDFT full backup will be removed.
@@ -1183,25 +1188,25 @@ With the `--merge-expired` option, the P7XDJA backup is merged with the underlyi
node 10 P7XDJA 2019-04-03 05:28:36+03 FULL STREAM 1/0 21s32MB 16MB1.0 0/13000028 0/13000198 OK
1192
1197
```
1193
1198
1194
1199
>NOTE: The Time field for the merged backup displays the time required for the merge.
1195
1200
1196
-
#### Pinning a Backup
1201
+
#### Backup Pinning
1197
1202
1198
1203
If you have the necessity to exclude certain backups from established retention policy then it is possible to pin a backup for an arbitrary amount of time. Example:
This command will set `expire-time` of specified backup to 30 days starting from backup `recovery-time` attribute. Basically 'expire-time = recovery-time + ttl'.
1207
+
This command will set `expire-time` of the specified backup to 30 days starting from backup `recovery-time` attribute. Basically `expire-time` = `recovery-time` + `ttl`.
1203
1208
1204
-
You can set `expire-time` explicitly using `--expire-time` option. Example:
1209
+
Also you can set `expire-time` explicitly using `--expire-time` option. Example:
@@ -1210,7 +1215,7 @@ Alternatively you can use the `--ttl` and `--expire-time` options with the [back
1210
1215
pg_probackup backup -B backup_dir --instance instance_name -b FULL --ttl=30d
1211
1216
pg_probackup backup -B backup_dir --instance instance_name -b FULL --expire-time='2020-01-01 00:00:00+03'
1212
1217
1213
-
You can determine the fact that backup is pinned and check due expire time by looking up 'expire-time' attribute in backup metadata via [show](#show) command:
1218
+
You can determine the fact that backup is pinned and check due expire time by looking up `expire-time` attribute in backup metadata via [show](#show) command:
1214
1219
1215
1220
pg_probackup show --instance instance_name -i backup_id
1216
1221
@@ -1223,15 +1228,17 @@ data-bytes = 22288792
1223
1228
...
1224
1229
```
1225
1230
1226
-
You can unpin a backup by setting `--ttl` option to zero using [set-backup](#set-backup) command. Example:
1231
+
You can unpin the backup by setting the`--ttl` option to zero using [set-backup](#set-backup) command. Example:
Only pinned backups have `expire-time` attribute in backup metadata.
1235
+
Only pinned backups have the `expire-time` attribute in the backup metadata.
1236
+
1237
+
>NOTE: Pinned incremental backup will also implicitly pin all its parent backups.
1231
1238
1232
-
### WAL Retention Policy
1239
+
####WAL Archive Retention Policy
1233
1240
1234
-
By default, pg_probackup treatment of WAL is very conservative and only "redundant" WAL segments can be purged, i.e. segments that cannot be applied to any existing backup in the backup catalog. To save disk space, you can configure WAL retention policy, to keep WAL of limited depth measured in backups.
1241
+
By default, pg_probackup treatment of WAL Archive is very conservative and only "redundant" WAL segments can be purged, i.e. segments that cannot be applied to any of the existing backups in the backup catalog. To save disk space, you can configure WAL Archive retention policy, that allows to keep WAL of limited depth measured in backups per timeline.
1235
1242
1236
1243
Suppose you have backed up the *node* instance in the *backup_dir* directory with configured [WAL archiving](#setting-up-continuous-wal-archiving):
1237
1244
@@ -1578,7 +1585,7 @@ For details, see the section [Merging Backups](#merging-backups).
1578
1585
1579
1586
Deletes backup with specified *backip_id* or launches the retention purge of backups and archived WAL that do not satisfy the current retention policies.
1580
1587
1581
-
For details, see the sections [Deleting Backups](#deleting-backups), [Retention Options](#retention-options) and [Configuring Backup Retention Policy](#configuring-backup-retention-policy).
1588
+
For details, see the sections [Deleting Backups](#deleting-backups), [Retention Options](#retention-options) and [Configuring Retention Policy](#configuring-retention-policy).
You can use these options together with [backup](#backup) and [delete](#delete) commands.
1681
-
1682
-
For details on configuring retention policy, see the sections[Configuring Backup Retention Policy](#configuring-backup-retention-policy).
1688
+
f
1689
+
For details on configuring retention policy, see the section[Configuring Retention Policy](#configuring-retention-policy).
1683
1690
1684
1691
--retention-redundancy=redundancy
1685
1692
Default: 0
@@ -1709,7 +1716,7 @@ Displays the current status of all the available backups, without deleting or me
1709
1716
1710
1717
You can use these options together with [backup](#backup) and [set-delete](#set-backup) commands.
1711
1718
1712
-
For details on backup pinning, see the section [Pinning a Backup](#pinning-a-backup).
1719
+
For details on backup pinning, see the section [Backup Pinning](#backup-pinning).
1713
1720
1714
1721
--ttl=ttl
1715
1722
Specifies the amount of time the backup should be pinned. Must be a positive integer. The zero value unpin already pinned backup. Supported units: ms, s, min, h, d (s by default). Example: `--ttl=30d`.
0 commit comments