1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-12 10:04:14 +02:00

Improve expire command documentation.

This commit is contained in:
Cynthia Shang 2021-02-05 11:48:07 -05:00 committed by David Steele
parent b65c370346
commit d350d1cc21
4 changed files with 76 additions and 14 deletions

View File

@ -1307,7 +1307,9 @@
<command id="expire" name="Expire">
<summary>Expire backups that exceed retention.</summary>
<text><backrest/> does backup rotation but is not concerned with when the backups were created. If two full backups are configured for retention, <backrest/> will keep two full backups no matter whether they occur two hours or two weeks apart.</text>
<text><backrest/> does full backup rotation based on the retention type which can be a count or a time period. When a count is specified, then expiration is not concerned with when the backups were created but with how many must be retained. Differential and Incremental backups are count-based but will always be expired when the backup they depend on is expired. See sections <link page="user-guide" section="/retention/full">Full Backup Retention</link> and <link page="user-guide" section="/retention/diff">Differential Backup Retention</link> for details and examples. Archived WAL is retained by default for backups that have not expired, however, although not recommended, this schedule can be modified per repository with the retention-archive options. See section <link page="user-guide" section="/retention/archive">Archive Retention</link> for details and examples.
The <cmd>expire</cmd> command is run automatically after each successful backup and can also be run by the user. When run by the user, expiration will occur as defined by the retention settings for each configured repository. Expiration can also be limited by the user to a specific backup set with the <br-option>--set</br-option> option. It should be noted that the archive retention schedule will be checked and performed any time the <cmd>expire</cmd> command is run.</text>
<option-list>
<!-- OPERATION - EXPIRE COMMAND - SET OPTION -->

View File

@ -128,6 +128,19 @@
</release-item>
</release-development-list>
</release-core-list>
<release-doc-list>
<release-improvement-list>
<release-item>
<release-item-contributor-list>
<release-item-contributor id="cynthia.shang"/>
<release-item-reviewer id="david.steele"/>
</release-item-contributor-list>
<p>Improve <cmd>expire</cmd> command documentation.</p>
</release-item>
</release-improvement-list>
</release-doc-list>
</release>
<release date="2020-12-07" version="2.31" title="Minor Bug Fixes and Improvements">

View File

@ -1510,6 +1510,8 @@
<p>Generally it is best to retain as many backups as possible to provide a greater window for <link section="/pitr">Point-in-Time Recovery</link>, but practical concerns such as disk space must also be considered. Retention options remove older backups once they are no longer needed.</p>
<cmd-description key="expire"/>
<!-- SECTION => RETENTION - FULL -->
<section id="full">
<title>Full Backup Retention</title>

View File

@ -114,19 +114,64 @@ static const unsigned char helpDataPack[] =
pckTypeStr << 4 | 0x09, 0x25, // Summary
0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x20, 0x62, 0x61, 0x63, 0x6B, 0x75, 0x70, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20,
0x65, 0x78, 0x63, 0x65, 0x65, 0x64, 0x20, 0x72, 0x65, 0x74, 0x65, 0x6E, 0x74, 0x69, 0x6F, 0x6E, 0x2E,
pckTypeStr << 4 | 0x08, 0xEB, 0x01, // Description
0x70, 0x67, 0x42, 0x61, 0x63, 0x6B, 0x52, 0x65, 0x73, 0x74, 0x20, 0x64, 0x6F, 0x65, 0x73, 0x20, 0x62, 0x61, 0x63, 0x6B,
0x75, 0x70, 0x20, 0x72, 0x6F, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x62, 0x75, 0x74, 0x20, 0x69, 0x73, 0x20, 0x6E,
0x6F, 0x74, 0x20, 0x63, 0x6F, 0x6E, 0x63, 0x65, 0x72, 0x6E, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x77, 0x68,
0x65, 0x6E, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x61, 0x63, 0x6B, 0x75, 0x70, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20,
0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x2E, 0x20, 0x49, 0x66, 0x20, 0x74, 0x77, 0x6F, 0x20, 0x66, 0x75, 0x6C, 0x6C,
0x20, 0x62, 0x61, 0x63, 0x6B, 0x75, 0x70, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x63, 0x6F, 0x6E, 0x66, 0x69, 0x67, 0x75,
0x72, 0x65, 0x64, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x72, 0x65, 0x74, 0x65, 0x6E, 0x74, 0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x70,
0x67, 0x42, 0x61, 0x63, 0x6B, 0x52, 0x65, 0x73, 0x74, 0x20, 0x77, 0x69, 0x6C, 0x6C, 0x20, 0x6B, 0x65, 0x65, 0x70, 0x20,
0x74, 0x77, 0x6F, 0x20, 0x66, 0x75, 0x6C, 0x6C, 0x20, 0x62, 0x61, 0x63, 0x6B, 0x75, 0x70, 0x73, 0x20, 0x6E, 0x6F, 0x20,
0x6D, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x79, 0x20,
0x6F, 0x63, 0x63, 0x75, 0x72, 0x20, 0x74, 0x77, 0x6F, 0x20, 0x68, 0x6F, 0x75, 0x72, 0x73, 0x20, 0x6F, 0x72, 0x20, 0x74,
0x77, 0x6F, 0x20, 0x77, 0x65, 0x65, 0x6B, 0x73, 0x20, 0x61, 0x70, 0x61, 0x72, 0x74, 0x2E,
pckTypeStr << 4 | 0x08, 0xE3, 0x08, // Description
0x70, 0x67, 0x42, 0x61, 0x63, 0x6B, 0x52, 0x65, 0x73, 0x74, 0x20, 0x64, 0x6F, 0x65, 0x73, 0x20, 0x66, 0x75, 0x6C, 0x6C,
0x20, 0x62, 0x61, 0x63, 0x6B, 0x75, 0x70, 0x20, 0x72, 0x6F, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x62, 0x61, 0x73,
0x65, 0x64, 0x20, 0x6F, 0x6E, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x74, 0x65, 0x6E, 0x74, 0x69, 0x6F, 0x6E, 0x20,
0x74, 0x79, 0x70, 0x65, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x63, 0x61, 0x6E, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20,
0x63, 0x6F, 0x75, 0x6E, 0x74, 0x20, 0x6F, 0x72, 0x20, 0x61, 0x20, 0x74, 0x69, 0x6D, 0x65, 0x20, 0x70, 0x65, 0x72, 0x69,
0x6F, 0x64, 0x2E, 0x20, 0x57, 0x68, 0x65, 0x6E, 0x20, 0x61, 0x20, 0x63, 0x6F, 0x75, 0x6E, 0x74, 0x20, 0x69, 0x73, 0x20,
0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x2C, 0x20, 0x74, 0x68, 0x65, 0x6E, 0x20, 0x65, 0x78, 0x70, 0x69,
0x72, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x69, 0x73, 0x20, 0x6E, 0x6F, 0x74, 0x20, 0x63, 0x6F, 0x6E, 0x63, 0x65, 0x72,
0x6E, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x77, 0x68, 0x65, 0x6E, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x61,
0x63, 0x6B, 0x75, 0x70, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x62,
0x75, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x68, 0x6F, 0x77, 0x20, 0x6D, 0x61, 0x6E, 0x79, 0x20, 0x6D, 0x75, 0x73,
0x74, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6E, 0x65, 0x64, 0x2E, 0x20, 0x44, 0x69, 0x66, 0x66, 0x65,
0x72, 0x65, 0x6E, 0x74, 0x69, 0x61, 0x6C, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x49, 0x6E, 0x63, 0x72, 0x65, 0x6D, 0x65, 0x6E,
0x74, 0x61, 0x6C, 0x20, 0x62, 0x61, 0x63, 0x6B, 0x75, 0x70, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x63, 0x6F, 0x75, 0x6E,
0x74, 0x2D, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x62, 0x75, 0x74, 0x20, 0x77, 0x69, 0x6C, 0x6C, 0x20, 0x61, 0x6C, 0x77,
0x61, 0x79, 0x73, 0x20, 0x62, 0x65, 0x20, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6E, 0x20,
0x74, 0x68, 0x65, 0x20, 0x62, 0x61, 0x63, 0x6B, 0x75, 0x70, 0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x64, 0x65, 0x70, 0x65,
0x6E, 0x64, 0x20, 0x6F, 0x6E, 0x20, 0x69, 0x73, 0x20, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x2E, 0x20, 0x53, 0x65,
0x65, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x73, 0x20, 0x46, 0x75, 0x6C, 0x6C, 0x20, 0x42, 0x61, 0x63, 0x6B,
0x75, 0x70, 0x20, 0x52, 0x65, 0x74, 0x65, 0x6E, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x44, 0x69, 0x66,
0x66, 0x65, 0x72, 0x65, 0x6E, 0x74, 0x69, 0x61, 0x6C, 0x20, 0x42, 0x61, 0x63, 0x6B, 0x75, 0x70, 0x20, 0x52, 0x65, 0x74,
0x65, 0x6E, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6C, 0x73, 0x20, 0x61,
0x6E, 0x64, 0x20, 0x65, 0x78, 0x61, 0x6D, 0x70, 0x6C, 0x65, 0x73, 0x2E, 0x20, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65,
0x64, 0x20, 0x57, 0x41, 0x4C, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6E, 0x65, 0x64, 0x20, 0x62, 0x79,
0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6C, 0x74, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x62, 0x61, 0x63, 0x6B, 0x75, 0x70, 0x73,
0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x6E, 0x6F, 0x74, 0x20, 0x65, 0x78, 0x70, 0x69, 0x72,
0x65, 0x64, 0x2C, 0x20, 0x68, 0x6F, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2C, 0x20, 0x61, 0x6C, 0x74, 0x68, 0x6F, 0x75, 0x67,
0x68, 0x20, 0x6E, 0x6F, 0x74, 0x20, 0x72, 0x65, 0x63, 0x6F, 0x6D, 0x6D, 0x65, 0x6E, 0x64, 0x65, 0x64, 0x2C, 0x20, 0x74,
0x68, 0x69, 0x73, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6C, 0x65, 0x20, 0x63, 0x61, 0x6E, 0x20, 0x62, 0x65, 0x20,
0x6D, 0x6F, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x70, 0x65, 0x72, 0x20, 0x72, 0x65, 0x70, 0x6F, 0x73, 0x69, 0x74,
0x6F, 0x72, 0x79, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x74, 0x65, 0x6E, 0x74, 0x69,
0x6F, 0x6E, 0x2D, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x20, 0x6F, 0x70, 0x74, 0x69, 0x6F, 0x6E, 0x73, 0x2E, 0x20,
0x53, 0x65, 0x65, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x41, 0x72, 0x63, 0x68, 0x69, 0x76, 0x65, 0x20,
0x52, 0x65, 0x74, 0x65, 0x6E, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6C,
0x73, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x65, 0x78, 0x61, 0x6D, 0x70, 0x6C, 0x65, 0x73, 0x2E, 0x0A, 0x0A,
0x54, 0x68, 0x65, 0x20, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x20, 0x63, 0x6F, 0x6D, 0x6D, 0x61, 0x6E, 0x64, 0x20, 0x69,
0x73, 0x20, 0x72, 0x75, 0x6E, 0x20, 0x61, 0x75, 0x74, 0x6F, 0x6D, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6C, 0x6C, 0x79, 0x20,
0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x66, 0x75,
0x6C, 0x20, 0x62, 0x61, 0x63, 0x6B, 0x75, 0x70, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x63, 0x61, 0x6E, 0x20, 0x61, 0x6C, 0x73,
0x6F, 0x20, 0x62, 0x65, 0x20, 0x72, 0x75, 0x6E, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72,
0x2E, 0x20, 0x57, 0x68, 0x65, 0x6E, 0x20, 0x72, 0x75, 0x6E, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73,
0x65, 0x72, 0x2C, 0x20, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x77, 0x69, 0x6C, 0x6C, 0x20,
0x6F, 0x63, 0x63, 0x75, 0x72, 0x20, 0x61, 0x73, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6E, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20,
0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x74, 0x65, 0x6E, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6E,
0x67, 0x73, 0x20, 0x66, 0x6F, 0x72, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x63, 0x6F, 0x6E, 0x66, 0x69, 0x67, 0x75, 0x72,
0x65, 0x64, 0x20, 0x72, 0x65, 0x70, 0x6F, 0x73, 0x69, 0x74, 0x6F, 0x72, 0x79, 0x2E, 0x20, 0x45, 0x78, 0x70, 0x69, 0x72,
0x61, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x63, 0x61, 0x6E, 0x20, 0x61, 0x6C, 0x73, 0x6F, 0x20, 0x62, 0x65, 0x20, 0x6C, 0x69,
0x6D, 0x69, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x74, 0x6F,
0x20, 0x61, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x62, 0x61, 0x63, 0x6B, 0x75, 0x70, 0x20, 0x73,
0x65, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x2D, 0x2D, 0x73, 0x65, 0x74, 0x20, 0x6F, 0x70,
0x74, 0x69, 0x6F, 0x6E, 0x2E, 0x20, 0x49, 0x74, 0x20, 0x73, 0x68, 0x6F, 0x75, 0x6C, 0x64, 0x20, 0x62, 0x65, 0x20, 0x6E,
0x6F, 0x74, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x72, 0x63, 0x68, 0x69, 0x76,
0x65, 0x20, 0x72, 0x65, 0x74, 0x65, 0x6E, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6C, 0x65,
0x20, 0x77, 0x69, 0x6C, 0x6C, 0x20, 0x62, 0x65, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6B, 0x65, 0x64, 0x20, 0x61, 0x6E, 0x64,
0x20, 0x70, 0x65, 0x72, 0x66, 0x6F, 0x72, 0x6D, 0x65, 0x64, 0x20, 0x61, 0x6E, 0x79, 0x20, 0x74, 0x69, 0x6D, 0x65, 0x20,
0x74, 0x68, 0x65, 0x20, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x20, 0x63, 0x6F, 0x6D, 0x6D, 0x61, 0x6E, 0x64, 0x20, 0x69,
0x73, 0x20, 0x72, 0x75, 0x6E, 0x2E,
// help command
// -------------------------------------------------------------------------------------------------------------------------