1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-18 04:58:51 +02:00

Add beta feature and documentation for block incremental backup.

This commit is contained in:
David Steele 2023-03-18 20:47:03 +08:00
parent 78c036efb7
commit 04d224b88e
5 changed files with 33 additions and 6 deletions

View File

@ -57,6 +57,7 @@
<commit subject="Block incremental map fixes and improvements.">
<github-pull-request id="2026"/>
</commit>
<commit subject="Add beta feature and documentation for block incremental backup."/>
<release-item-contributor-list>
<release-item-contributor id="david.steele"/>

View File

@ -1576,6 +1576,26 @@
<p>While file bundling is generally more efficient, the downside is that it is more difficult to manually retrieve files from the repository. It may not be ideal for deduplicated storage since each full backup will arrange files in the bundles differently. Lastly, file bundles cannot be resumed, so be careful not to set <br-option>repo-bundle-size</br-option> too high.</p>
</section>
<!-- =================================================================================================================== -->
<section id="block">
<title>Block Incremental</title>
<admonition type="important">This feature is in beta release and should not be used in production. The on-disk format will change before the GA release. The <br-option>beta</br-option> option must be enabled to prevent accidental usage of beta features.</admonition>
<p>Block incremental backups save space by only storing the parts of a file that have changed since the prior backup rather than storing the entire file.</p>
<p>The block incremental feature is enabled with the <br-option>repo-block</br-option> option and it works best when enabled for all backup types. File bundling must also be enabled.</p>
<backrest-config host="{[host-pg1]}" file="{[backrest-config-demo]}">
<title>Configure <br-option>repo1-block</br-option></title>
<backrest-config-option section="global" key="beta">y</backrest-config-option>
<backrest-config-option section="global" key="repo1-block">y</backrest-config-option>
</backrest-config>
<p>The <br-option>repo-block-size-map</br-option>, <br-option>repo-block-size-super</br-option>, <br-option>repo-block-size-super-full</br-option>, <br-option>repo-block-age-map</br-option>, and <br-option>repo-block-checksum-size-map</br-option> options can be used for tuning, though the defaults should be optimal in most cases. Note that these options may not be be available after the beta since they are primarily intended to allow experimentation to find the optimal values.</p>
</section>
<!-- =================================================================================================================== -->
<section id="annotate">
<title>Backup Annotations</title>

View File

@ -1881,7 +1881,7 @@ option:
section: global
group: repo
type: boolean
internal: true
beta: true
default: false
command:
backup: {}
@ -1898,7 +1898,7 @@ option:
group: repo
type: hash
required: false
internal: true
beta: true
command: repo-block
command-role:
main: {}
@ -1919,7 +1919,7 @@ option:
type: size
default: 256KiB
allow-range: [32KiB, 16MiB]
internal: true
beta: true
command: repo-block
command-role:
main: {}

View File

@ -539,7 +539,7 @@
<p>Map file age (in days) to a block multiplier. Files that have not been modified recently are less likely to be modified in the future, so the block size is multiplied to reduce the map size. By default, if the file is old enough it will not be stored as a block incremental.</p>
</text>
<example>7=2</example>
<example>7=2|14=4</example>
</config-key>
<config-key id="repo-block-checksum-size-map" name="Block Incremental Checksum Size Map">
@ -549,7 +549,7 @@
<p>Map block size to checksum size. Smaller checksums save space in the map but may not be able to reliably detect changes in the block.</p>
</text>
<example>7=2</example>
<example>32KiB=7|128KiB=8</example>
</config-key>
<config-key id="repo-block-size-map" name="Block Incremental Size Map">
@ -559,7 +559,7 @@
<p>Map file size to block size. Block size is the minimum unit that will be stored in the block incremental. Smaller sizes allow for more granular incremental backups but larger sizes mean smaller maps.</p>
</text>
<example>16KiB=8KiB</example>
<example>16KiB=8KiB|128KiB=16KiB|512KiB=32KiB</example>
</config-key>
<config-key id="repo-block-size-super" name="Block Incremental Super Block Size">

View File

@ -5076,6 +5076,7 @@ static const ParseRuleOption parseRuleOption[CFG_OPTION_TOTAL] =
( // opt/repo-block
PARSE_RULE_OPTION_NAME("repo-block"), // opt/repo-block
PARSE_RULE_OPTION_TYPE(cfgOptTypeBoolean), // opt/repo-block
PARSE_RULE_OPTION_BETA(true), // opt/repo-block
PARSE_RULE_OPTION_NEGATE(true), // opt/repo-block
PARSE_RULE_OPTION_RESET(true), // opt/repo-block
PARSE_RULE_OPTION_REQUIRED(true), // opt/repo-block
@ -5111,6 +5112,7 @@ static const ParseRuleOption parseRuleOption[CFG_OPTION_TOTAL] =
( // opt/repo-block-age-map
PARSE_RULE_OPTION_NAME("repo-block-age-map"), // opt/repo-block-age-map
PARSE_RULE_OPTION_TYPE(cfgOptTypeHash), // opt/repo-block-age-map
PARSE_RULE_OPTION_BETA(true), // opt/repo-block-age-map
PARSE_RULE_OPTION_RESET(true), // opt/repo-block-age-map
PARSE_RULE_OPTION_REQUIRED(false), // opt/repo-block-age-map
PARSE_RULE_OPTION_SECTION(cfgSectionGlobal), // opt/repo-block-age-map
@ -5140,6 +5142,7 @@ static const ParseRuleOption parseRuleOption[CFG_OPTION_TOTAL] =
( // opt/repo-block-checksum-size-map
PARSE_RULE_OPTION_NAME("repo-block-checksum-size-map"), // opt/repo-block-checksum-size-map
PARSE_RULE_OPTION_TYPE(cfgOptTypeHash), // opt/repo-block-checksum-size-map
PARSE_RULE_OPTION_BETA(true), // opt/repo-block-checksum-size-map
PARSE_RULE_OPTION_RESET(true), // opt/repo-block-checksum-size-map
PARSE_RULE_OPTION_REQUIRED(false), // opt/repo-block-checksum-size-map
PARSE_RULE_OPTION_SECTION(cfgSectionGlobal), // opt/repo-block-checksum-size-map
@ -5169,6 +5172,7 @@ static const ParseRuleOption parseRuleOption[CFG_OPTION_TOTAL] =
( // opt/repo-block-size-map
PARSE_RULE_OPTION_NAME("repo-block-size-map"), // opt/repo-block-size-map
PARSE_RULE_OPTION_TYPE(cfgOptTypeHash), // opt/repo-block-size-map
PARSE_RULE_OPTION_BETA(true), // opt/repo-block-size-map
PARSE_RULE_OPTION_RESET(true), // opt/repo-block-size-map
PARSE_RULE_OPTION_REQUIRED(false), // opt/repo-block-size-map
PARSE_RULE_OPTION_SECTION(cfgSectionGlobal), // opt/repo-block-size-map
@ -5198,6 +5202,7 @@ static const ParseRuleOption parseRuleOption[CFG_OPTION_TOTAL] =
( // opt/repo-block-size-super
PARSE_RULE_OPTION_NAME("repo-block-size-super"), // opt/repo-block-size-super
PARSE_RULE_OPTION_TYPE(cfgOptTypeSize), // opt/repo-block-size-super
PARSE_RULE_OPTION_BETA(true), // opt/repo-block-size-super
PARSE_RULE_OPTION_RESET(true), // opt/repo-block-size-super
PARSE_RULE_OPTION_REQUIRED(true), // opt/repo-block-size-super
PARSE_RULE_OPTION_SECTION(cfgSectionGlobal), // opt/repo-block-size-super
@ -5238,6 +5243,7 @@ static const ParseRuleOption parseRuleOption[CFG_OPTION_TOTAL] =
( // opt/repo-block-size-super-full
PARSE_RULE_OPTION_NAME("repo-block-size-super-full"), // opt/repo-block-size-super-full
PARSE_RULE_OPTION_TYPE(cfgOptTypeSize), // opt/repo-block-size-super-full
PARSE_RULE_OPTION_BETA(true), // opt/repo-block-size-super-full
PARSE_RULE_OPTION_RESET(true), // opt/repo-block-size-super-full
PARSE_RULE_OPTION_REQUIRED(true), // opt/repo-block-size-super-full
PARSE_RULE_OPTION_SECTION(cfgSectionGlobal), // opt/repo-block-size-super-full