You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-05-22 10:15:16 +02:00
Add infrastructure for multiple compression type support.
Add compress-type option and deprecate compress option. Since the compress option is boolean it won't work with multiple compression types. Add logic to cfgLoadUpdateOption() to update compress-type if it is not set directly. The compress option should no longer be referenced outside the cfgLoadUpdateOption() function. Add common/compress/helper module to contain interface functions that work with multiple compression types. Code outside this module should no longer call specific compression drivers, though it may be OK to reference a specific compression type using the new interface (e.g., saving backup history files in gz format). Unit tests only test compression using the gz format because other formats may not be available in all builds. It is the job of integration tests to exercise all compression types. Additional compression types will be added in future commits.
This commit is contained in:
+20
-6
@@ -126,18 +126,32 @@
|
||||
|
||||
<!-- CONFIG - GENERAL SECTION - COMPRESS -->
|
||||
<config-key id="compress" name="Compress">
|
||||
<summary>Use gzip file compression.</summary>
|
||||
<summary>Use file compression.</summary>
|
||||
|
||||
<text>Backup files are compatible with command-line gzip tools.</text>
|
||||
<text>Backup files are compatible with command-line compression tools.
|
||||
|
||||
This option is now deprecated. The <setting>compress-type</setting> option should be used instead.</text>
|
||||
|
||||
<example>n</example>
|
||||
</config-key>
|
||||
|
||||
<!-- CONFIG - GENERAL SECTION - COMPRESS-TYPE -->
|
||||
<config-key id="compress-type" name="Compress Type">
|
||||
<summary>File compression type.</summary>
|
||||
|
||||
<text>The following compression types are supported:
|
||||
<ul>
|
||||
<li><id>gz</id> - gzip compression format</li>
|
||||
</ul></text>
|
||||
|
||||
<example>n</example>
|
||||
</config-key>
|
||||
|
||||
<!-- CONFIG - GENERAL SECTION - COMPRESS-LEVEL KEY -->
|
||||
<config-key id="compress-level" name="Compress Level">
|
||||
<summary>Compression level for stored files.</summary>
|
||||
<summary>File compression level.</summary>
|
||||
|
||||
<text>Sets the zlib level to be used for file compression when <setting>compress=y</setting>.</text>
|
||||
<text>Sets the level to be used for file compression when <setting>compress-type</setting> does not equal <id>none</id> or <setting>compress=y</setting> (deprecated).</text>
|
||||
|
||||
<allow>0-9</allow>
|
||||
<example>9</example>
|
||||
@@ -145,9 +159,9 @@
|
||||
|
||||
<!-- CONFIG - GENERAL SECTION - COMPRESS-LEVEL-NETWORK KEY -->
|
||||
<config-key id="compress-level-network" name="Network Compress Level">
|
||||
<summary>Compression level for network transfer when <setting>compress=n</setting>.</summary>
|
||||
<summary>Network compression level.</summary>
|
||||
|
||||
<text>Sets the zlib level to be used for protocol compression when <setting>compress=n</setting> and the database cluster is not on the same host as the repository. Protocol compression is used to reduce network traffic but can be disabled by setting <setting>compress-level-network=0</setting>. When <setting>compress=y</setting> the <setting>compress-level-network</setting> setting is ignored and <setting>compress-level</setting> is used instead so that the file is only compressed once. SSH compression is always disabled.</text>
|
||||
<text>Sets the network compression level when <setting>compress-type=none</setting> and the command is not run on the same host as the repository. Compression is used to reduce network traffic but can be disabled by setting <setting>compress-level-network=0</setting>. When <setting>compress-type</setting> does not equal <id>none</id> the <setting>compress-level-network</setting> setting is ignored and <setting>compress-level</setting> is used instead so that the file is only compressed once. SSH compression is always disabled.</text>
|
||||
|
||||
<allow>0-9</allow>
|
||||
<example>1</example>
|
||||
|
||||
Reference in New Issue
Block a user