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

Documentation updates for exclude feature based on review.

Reviewed by Cynthia Shang.
This commit is contained in:
David Steele 2018-08-28 16:49:29 -04:00
parent 14cde54b37
commit c638490451
3 changed files with 9 additions and 3 deletions

View File

@ -538,7 +538,7 @@
<config-key id="exclude" name="Path/File Exclusions">
<summary>Exclude paths/files from the backup.</summary>
<text>If the exclusion ends with / then only files in the specified directory will be excluded, e.g. <br-option>--exclude=junk/</br-option> will exclude all files in the <path>junk</path> directory but include the directory itself. If the exclusion does not end with / then the file may match the exclusion exactly or match with / appended to the exclusion, e.g. <br-option>--exclude=junk</br-option> will exclude the <path>junk</path> directory and all the files it contains.
<text>All exclusions are relative to <path>$PGDATA</path>. If the exclusion ends with / then only files in the specified directory will be excluded, e.g. <br-option>--exclude=junk/</br-option> will exclude all files in the <path>$PGDATA/junk</path> directory but include the directory itself. If the exclusion does not end with / then the file may match the exclusion exactly or match with / appended to the exclusion, e.g. <br-option>--exclude=junk</br-option> will exclude the <path>$PGDATA/junk</path> directory and all the files it contains.
<b>Be careful using this feature -- it is very easy to exclude something critical that will make the backup inconsistent. Be sure to test your restores!</b>
@ -546,7 +546,9 @@
Note that exclusions are not honored on delta restores. Any files/directories that were excluded by the backup will be <i>removed</i> on delta restore.
This option should not be used to exclude <postgres/> logs from a backup. Logs can be moved out of the <id>PGDATA</id> directory using the <postgres/> <setting>log_directory</setting> setting, which has the benefit of allowing logs to be preserved after a restore.</text>
This option should not be used to exclude <postgres/> logs from a backup. Logs can be moved out of the <id>PGDATA</id> directory using the <postgres/> <setting>log_directory</setting> setting, which has the benefit of allowing logs to be preserved after a restore.
Multiple exclusions may be specified on the command-line or in a configuration file.</text>
<example>junk/</example>
</config-key>

View File

@ -54,6 +54,10 @@
</release-item>
<release-item>
<release-item-contributor-list>
<release-item-reviewer id="cynthia.shang"/>
</release-item-contributor-list>
<p>Allow arbitrary directories and/or files to be excluded from a backup. Misuse of this feature can lead to inconsistent backups so read the <br-option>--exclude</br-option> documentation carefully before using.</p>
</release-item>

View File

@ -943,7 +943,7 @@ sub run
{'postgresql.auto.conf' => true, 'hosts' => true, 'pg_log/' => true, 'global/exclude' => true});
$self->testResult(sub {$self->manifestCompare($oManifestExpected, $oManifest)}, "", 'check exclusions');
# Remove excluded files to we don't have to pass exclusions to the rest of the tests
# Remove excluded files so we don't have to pass exclusions to the rest of the tests
storageDb()->remove('postgresql.auto.conf');
storageDb()->remove('hosts');
storageDb()->remove('pg_log/logfile');