2 F.4. basebackup_to_shell — example "shell" pg_basebackup module #
4 F.4.1. Configuration Parameters
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.
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.
20 F.4.1. Configuration Parameters #
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.
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.
42 Robert Haas <rhaas@postgresql.org>