]> begriffs open source - ai-pg/blob - full-docs/txt/basebackup-to-shell.txt
Convert HTML docs to more streamlined TXT
[ai-pg] / full-docs / txt / basebackup-to-shell.txt
1
2 F.4. basebackup_to_shell — example "shell" pg_basebackup module #
3
4    F.4.1. Configuration Parameters
5    F.4.2. Author
6
7    basebackup_to_shell adds a custom basebackup target called shell. This
8    makes it possible to run pg_basebackup --target=shell or, depending on
9    how this module is configured, pg_basebackup
10    --target=shell:DETAIL_STRING, and cause a server command chosen by the
11    server administrator to be executed for each tar archive generated by
12    the backup process. The command will receive the contents of the
13    archive via standard input.
14
15    This module is primarily intended as an example of how to create a new
16    backup targets via an extension module, but in some scenarios it may be
17    useful for its own sake. In order to function, this module must be
18    loaded via shared_preload_libraries or local_preload_libraries.
19
20 F.4.1. Configuration Parameters #
21
22    basebackup_to_shell.command (string)
23           The command which the server should execute for each archive
24           generated by the backup process. If %f occurs in the command
25           string, it will be replaced by the name of the archive (e.g.
26           base.tar). If %d occurs in the command string, it will be
27           replaced by the target detail provided by the user. A target
28           detail is required if %d is used in the command string, and
29           prohibited otherwise. For security reasons, it may contain only
30           alphanumeric characters. If %% occurs in the command string, it
31           will be replaced by a single %. If % occurs in the command
32           string followed by any other character or at the end of the
33           string, an error occurs.
34
35    basebackup_to_shell.required_role (string)
36           The role required in order to make use of the shell backup
37           target. If this is not set, any replication user may make use of
38           the shell backup target.
39
40 F.4.2. Author #
41
42    Robert Haas <rhaas@postgresql.org>