1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-04 09:43:08 +02:00
Commit Graph

47 Commits

Author SHA1 Message Date
Kian-Meng Ang
c351263a1d
Fix typos.
Found using `codespell -S *.eps,*.cache,*.xml -L inout,te,fo,bload,fase,collet,hilight,debians,keep-alives` and `typos --hidden --format brief`.
2024-11-22 15:25:43 -05:00
David Steele
1ebdcd611d Use output path for temp config files during documentation build.
Putting the files in the user's home directory was too Linux-centric.
2024-10-08 10:28:01 +03:00
David Steele
6e8a45f650 v2.53: Concurrent Backups
IMPORTANT NOTE: The log-level-stderr option default has been changed from warn to off. This makes it easier to capture errors when only redirecting stdout. To preserve the prior behavior set log-level-stderr=warn.

NOTE TO PACKAGERS: The lz4 library is now required by the meson build.

NOTE TO PACKAGERS: Compiler support for __builtin_clzl() and __builtin_bswap64() is now required by the meson build.

Bug Fixes:

* Fix SFTP renaming failure when file already exists. (Fixed by Reid Thompson. Reviewed by David Steele. Reported by ahmed112212.)

Features:

* Allow backups to run concurrently on different repositories. (Reviewed by Reid Thompson, Stefan Fercot.)
* Support IP-based SANs for TLS certificate validation. (Contributed by David Christensen. Reviewed by David Steele.)

Improvements:

* Default log-level-stderr option to off. (Reviewed by Greg Sabino Mullane, Stefan Fercot.)
* Allow alternative WAL segment sizes for PostgreSQL ≤ 10. (Contributed by Viktor Kurilko. Reviewed by David Steele.)
* Add hint to check SFTP authorization log. (Contributed by Vitalii Zurian. Reviewed by Reid Thompson, David Steele.)

Documentation Improvements:

* Clarify archive-push multi-repo behavior. (Reviewed by Stefan Fercot.)
2024-07-22 09:33:31 +07:00
David Steele
794c577130 Migrate integration tests to C.
The Perl integration tests were migrated as faithfully as possible, but there was some cruft and a few unit tests that it did not make sense to migrate.

Also remove all Perl code made obsolete by this migration.

All unit, performance, and integration tests are now written in C but significant parts of the test harness remain to be migrated.
2024-03-06 11:00:09 +13:00
David Steele
1a0cc96c5a Migrate man page generation to C. 2024-01-23 09:56:26 -03:00
David Steele
1eb0162208 Build command and configuration reference in C.
Migrate generation of these files from help.xml to the intermediate documentation format. This allows us to share a lot of code that is already in C and remove duplicated code in Perl. More duplicate code can be removed in Perl once man generation is migrated.

Also update the unit test harness to allow testing of modules in the doc directory.
2023-10-09 14:03:43 -04:00
David Steele
33ba4db9cb Use CSS to number sections in documentation.
This reduces churn in the HTML when sections are added or removed from the documentation.
2023-09-30 09:40:44 -04:00
David Steele
088026e6ff Allow documentation source file to be specified in manifest.
The help source file had previously been hardcoded and now that is no longer needed.

A future commit will introduce more sources outside of the xml path.
2023-09-29 17:06:37 -04:00
David Steele
55fda01733 Remove unused references to DocConfig and DocConfigData Perl modules. 2023-09-29 16:57:01 -04:00
David Steele
cb3ff6ed43 Fix command reference example for the filter option.
This example was broken by 24f7252. Revert to (almost) the prior code to fix this example until something better can be committed. The something better is in progress but it adds new build requirements so it is too late to include it for the release.

Technically this breaks some other examples, but they are all internal and not visible in the user-facing documentation.
2023-09-23 13:41:03 -04:00
David Steele
1bd5530a59 Remove double spaces from comments and documentation.
Double spaces have fallen out of favor in recent years because they no longer contribute to readability.

We have been using single spaces and editing related paragraphs for some time, but now it seems best to update the remaining instances to avoid churn in unrelated commits and to make it clearer what spacing contributors should use.
2023-05-02 12:57:12 +03:00
David Steele
a9f39857cf Remove unused strOS parameter in Common::HostTest. 2023-04-05 11:24:53 +04:00
David Steele
24f725212d Add beta feature infrastructure.
This allows options to be marked as beta, which will require that the --beta option be supplied to prevent accidental usage of a beta feature.

The online and command-line documentation also show warnings when options are beta.
2023-03-10 15:30:27 +07:00
David Steele
44da314adb
Add compress-level range checking for each compress-type.
The prior range checking was done based on the valid values for gz. While this worked it was a subset of what is available for lz4 and zst.

Allow the range to be specified for each compress-type. Adding this functionality to the parse module would be a better solution but that is a bigger project than this fix deserves, at least for now.
2022-12-27 20:05:08 +07:00
David Steele
37b4592e52 Allow host memory limits in the user guide to be disabled.
These limits can cause errors in some environments, e.g. Docker in Docker on Mac M1.

Entirely remove limits from the build, s3, and azure hosts since memory usage on these hosts is out of our control and not useful for testing.

Also allow empty variables to be rendered as blank.
2022-08-24 08:45:44 -04:00
David Steele
2643050be0 Skip internal options in the configuration reference.
Most internal options were being skipped, but not in the case where an option was marked internal for a specific command.

The command-line help was not affected by this issue.
2022-05-31 12:36:21 -04:00
David Steele
5fbea6da81 Add br tag for documentation.
This tag allows for a simple linefeed in a p tag instead of being forced to start a new paragraph.
2022-05-11 10:39:31 -04:00
David Steele
2c96327e65 Remove extraneous double spaces in code and comments. 2022-03-15 17:55:48 -06:00
David Steele
f716e98ad0 Suppress errors when there is stderr output for Docker builds.
Docker outputs build info to stderr even when the build is successful. This seems to be especially true on Mac M1.

ContainerTest.pm already does this suppression so add it the other places where containers are built.
2022-02-26 11:31:52 -06:00
David Steele
6abb06248c Make analytics optional for HTML documentation.
Analytics should only be added to the current HTML documentation on the website, so exclude them by default.
2021-10-29 11:45:50 -04:00
David Steele
1336657326 Restore some linefeed rendering behavior from before def7d513.
The new rendering behavior is correct in normal cases, but for the pre-rendered HTML blocks in the command and configuration references it causes a lot of churn. This would be OK if the new HTML was diff-able, but it is not.

Go back to the old behavior of using br tags for this case to reduce churn until a more permanent solution is found.
2021-10-29 10:35:56 -04:00
David Steele
653ffcf8d9 Adjustments for new breaking change in Azurite.
Azurite released another breaking change (see fbd018cd, 096829b3, c38d6926, and Azurite issue 1039) so make adjustments as needed to documentation and tests.

Also remove some dead code that hid the repo-storage-host option and was made obsolete by all these changes.
2021-10-25 15:42:28 -04:00
David Steele
cb36fec102 Add analytics to the HTML documentation. 2021-10-21 17:48:00 -04:00
David Steele
e443e3c6c0 Add br tags for HTML documentation rendering missed in def7d513. 2021-10-19 09:06:06 -04:00
David Steele
01b20724da Rename PostgreSQL pid file constants and tests. 2021-10-13 19:36:59 -04:00
David Steele
f4e1babf6b Migrate command-line help generation to C.
Command-line help is now generated at build time so it does not need to be committed. This reduces churn on commits that add configuration and/or update the help.

Since churn is no longer an issue, help.auto.c is bzip2 compressed to save space in the binary.

The Perl config parser (Data.pm) has been moved to doc/lib since the Perl build path is no longer required.

Likewise doc/xml/reference.xml has been moved to src/build/help/help.xml since it is required at build time.
2021-09-08 18:16:06 -04:00
David Steele
def7d513cd Eliminate linefeed formatting from documentation.
Linefeeds were originally used in the place of <p> tags to denote a paragraph. While much of the linefeed usage has been replaced over time, there were many places where it was still being used, especially in reference.xml. This made it difficult to get consistent formatting across different output types. In particular there were formatting issues in the command-line help because it is harder to audit than HTML or PDF.

Replace linefeed formatting with proper <p> tags to make formatting more consistent.

Remove double spaces in all text where <p> tags were added since it does not add churn.

Update all <ul>/<ol>/<li> tags to the more general <list>/<list-item> tags.

Add a few missing periods.
2021-09-08 17:35:45 -04:00
David Steele
02b06aa495
Increase max index allowed for pg/repo options to 256.
The prior limitations were based on using getopt_long() to parse command-line options, which required a static list of allowed options. Setting index max too high bloated the binary unacceptably. 45a4e80 replaced the functionality of getopt_long() but the static list remained.

Improve cfgParseOption() to use available option data and remove the need for a static list. This also allows the option deprecations to be represented more compactly.

Index max is still capped at 256 because a large enough index could cause parseOptionIdxValue() to run out of memory since it allocates a static list based on the highest index found. If that function were improved with a map of found index values then index max could be set to UINT64_MAX.

Note that deprecations no longer set an index max or define whether reset is valid. These were space-saving measures which are no longer required. This means that indexed deprecated options will also be valid up to 256 and always allow reset, but it doesn't seem worth additional code to limit this behavior.

cfgParseOptionId() is no longer needed because calling cfgParseOption() with .ignoreMissingIndex = true duplicates the functionality of cfgParseOptionId(). This leads to some simplification in the help code.
2021-08-31 12:09:50 -04:00
David Steele
0679128461 Add linefeeds around content even when not in pretty mode.
This makes the generated HTML much more readable in diffs because a single word change will not change a line with potentially many tags.

The output is now slightly larger because of the extra linefeeds.
2021-08-06 09:48:55 -04:00
David Steele
58cc470b3e Remove code made obsolete by f3f0c64a.
The code in DocExecute.pm appears to have been obsolete for a long time.
2021-07-29 08:14:17 -04:00
Eric Radman
23bdc3deb6
Fix documentation and comment typos.
Identified using `ag -l | igor`.
2021-07-01 11:50:03 -04:00
David Steele
831ee81466
Rename default command role to main.
Main makes more sense because we refer to the main process in the code, not the default process. The word default is pretty overloaded anyway.
2021-05-20 14:39:47 -04:00
David Steele
aaa15b9709
Add help for all internal options valid for default roles.
Fix the segfault when getting help for an internal option is requested by adding help for all internal options that are valid for a default command role.

Also print warnings about internal options in code rather than putting in each command/option description.
2021-04-23 11:46:03 -04:00
David Steele
fe4ba455ed Move configuration definition to src/build/config/config.yaml.
Moving to YAML allows the configuration data to be read by C programs.

Also go back to using YAML::XS since it is the only implementation that has proper boolean support.
2021-03-08 16:01:05 -05:00
David Steele
e7bbdf38ec Fix option validity by role and make sections conform to C help.
The HTML command reference was showing some options that were not valid because it did not properly understand the new role validity system. Also, the custom section for the new repo option was not being honored.

This is a bit messy because it leads to some duplicated code in help.c but there doesn't seem to be any way to fix that with the Perl data structures as they are.

This code is being migrated to C so it doesn't seem worth messing with it too much with the risk of breaking other things.
2021-03-05 12:57:07 -05:00
David Steele
d1aa765a9d
Consolidate less commonly used repository storage options.
The following options are renamed as specified:

repo1-azure-ca-file -> repo1-storage-ca-file
repo1-azure-ca-path -> repo1-storage-ca-path
repo1-azure-host -> repo1-storage-host
repo1-azure-port -> repo1-storage-port
repo1-azure-verify-tls -> repo1-storage-verify-tls
repo1-s3-ca-file -> repo1-storage-ca-file
repo1-s3-ca-path -> repo1-storage-ca-path
repo1-s3-host -> repo1-storage-host
repo1-s3-port -> repo1-storage-port
repo1-s3-verify-tls -> repo1-storage-verify-tls

The old option names (e.g. repo1-s3-port) will continue to work for repo1, but repo2, etc. will require the new names.
2021-03-02 13:51:40 -05:00
David Steele
26cbebbda7 Use latex sloppypar to fix monospace wrapping in PDF rendering.
Monospaced identifiers could end up running over if latex was not able to find a place to break the line. Using sloppypar forces breaks so monospaced identifiers don't run over or get broken up.

Also add vspace to admonitions so they have some separation from the prior text.
2021-02-10 09:10:51 -05:00
Cynthia Shang
f32eb9b94e
Partial multi-repository implementation.
Multi-repository implementations for the archive-push, check, info, stanza-create, stanza-upgrade, and stanza-delete commands.

Multi-repo configuration is disabled so there should be no behavioral changes between these commands and their current single-repo implementations.

Multi-repo documentation and integration tests are still in the multi-repo development branch. All unit tests work as multi-repo since they are able to bypass the configuration restrictions.
2021-01-21 15:21:50 -05:00
David Steele
293add28fd Add text rendering for page links missed in 597739fa.
Since links are not possible in the command line help just display the name of the linked section.

Also, during reference text rendering there is no out key so make sure it is defined before trying to use it.
2020-10-05 08:37:48 -04:00
David Steele
597739fafe
Move info command text to the reference and link to user guide.
This means the same text will appear in both places, which should make it easier to find.

Also update the link code to allow both page and section to be specified rather than only one or the other.
2020-09-25 11:26:27 -04:00
David Steele
3f4371d7a2 Azure support for repository storage.
Azure and Azure-compatible object stores can now be used for repository storage.

Currently only shared key authentication is supported but SAS will be added soon.
2020-07-02 16:24:34 -04:00
David Steele
be16bf69a8 Remove internal commands from HTML and man command references.
Some of these commands will be made public in the future but for now their interfaces are not stable so they remain internal.
2020-06-29 15:07:17 -04:00
David Steele
3d74ec1190
Use PostgreSQL instead of postmaster where appropriate.
Using postmaster in messages was not very helpful since users rarely interact directly with the postmaster. Using PostgreSQL instead seems clearer.
2020-06-17 15:14:59 -04:00
David Steele
0dd6629a2d Automatically add default user as reviewer.
Contributions looked like they had no reviewer when reviewed by the default user.
2020-04-24 08:40:54 -04:00
David Steele
a180251011 Do variable replacements for cmd-extra in documentation. 2020-03-22 09:59:38 -04:00
David Steele
4a5bd002c0 Move pgBackRest::Version module to pgBackRestDoc::ProjectInfo.
The primary source for project info is now src/version.h.

The pgBackRestDoc::ProjectInfo module loads the project info from src/version.h at runtime so there is no need to update it.
2020-03-10 17:57:02 -04:00
David Steele
731b862e6f Rename BackRestDoc Perl module to pgBackRestDoc.
This is consistent with the way BackRest and BackRest test were renamed way back in 18fd2523.

More modules will be moving to pgBackRestDoc soon so renaming now reduces churn later.
2020-03-10 15:41:56 -04:00