Debian Codegraph @

docs/_build/man/barman.5

raw
1 '\" t
2 .\" Man page generated from reStructuredText
3 .\" by the Docutils 0.22.4 manpage writer.
4 .
5 .
6 .nr rst2man-indent-level 0
7 .
8 .de1 rstReportMargin
9 \\$1 \\n[an-margin]
10 level \\n[rst2man-indent-level]
11 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
12 -
13 \\n[rst2man-indent0]
14 \\n[rst2man-indent1]
15 \\n[rst2man-indent2]
16 ..
17 .de1 INDENT
18 .\" .rstReportMargin pre:
19 . RS \\$1
20 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
21 . nr rst2man-indent-level +1
22 .\" .rstReportMargin post:
23 ..
24 .de UNINDENT
25 . RE
26 .\" indent \\n[an-margin]
27 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
28 .nr rst2man-indent-level -1
29 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
30 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
31 ..
32 .TH "BARMAN" "5" "Sep 29, 2026" "3.20" "Barman"
33 .SH NAME
34 barman \- Barman Configurations
35 .sp
36 Barman follows a convention over configuration approach, which simplifies configuration
37 by allowing some options to be defined globally and overridden at the server level. This
38 means you can set a default behavior for your servers and then customize specific servers
39 as needed. This design reduces the need for excessive configuration while maintaining
40 flexibility.
41 .SH USAGE
42 .sp
43 Proper configuration is critical for its effective operation. Barman uses different types
44 of configuration files to manage global settings, server\-specific settings, and
45 model\-specific settings that is made up of three scopes:
46 .sp
47 1. \fBGlobal Configuration\fP: It comprises one file with a set of configurations for the
48 barman system, such as the main directory, system user, log file, and other general
49 options. Default location is \fB/etc/barman.conf\fP and it can be overridden on a per\-user
50 level by \fB~/.barman.conf\fP or by specifying a \fB\&.conf\fP file using the \fB\-c\fP /
51 \fB\-\-config\fP with the barman command \%<#\:commands-barman> directly in the CLI.
52 .sp
53 Barman searches for its configuration file in a predefined order and uses the first one
54 it finds. The search order is as follows:
55 .INDENT 0.0
56 .IP \(bu 2
57 \fB~/.barman.conf\fP \- per\-user configuration file.
58 .IP \(bu 2
59 \fB/etc/barman.conf\fP \- main global configuration file.
60 .IP \(bu 2
61 \fB/etc/barman/barman.conf\fP \- alternative global configuration file.
62 .UNINDENT
63 .sp
64 2. \fBServer Configuration\fP: It comprises one or more files with a set of
65 configurations for a Postgres server that you want to keep track and interact for
66 backup, recovery and/or replication. Default location is \fB/etc/barman.d\fP and must use
67 the \fB\&.conf\fP suffix. You may have one or multiple files for servers. You can override the
68 default location by setting the \fBconfiguration_files_directory\fP option in the global
69 configuration file and placing the files in that particular location.
70 .sp
71 3. \fBModel Configuration\fP: It comprises one or more files with a set of configuration
72 overrides that can be applied to backups of Postgres servers within the same cluster as
73 the model. These overrides can be implemented using the barman \fBconfig\-switch\fP command.
74 Default location is \fB/etc/barman.d\fP and must use the \fB\&.conf\fP suffix. The same
75 \fBconfiguration_files_directory\fP override option from the server configuration applies for
76 models. You may have one or multiple files for models.
77 .sp
78 \fBNote:\fP
79 .INDENT 0.0
80 .INDENT 3.5
81 Historically, you could have a single configuration file containing global, server, and
82 model options, but, for maintenance reasons, this approach is deprecated.
83 .UNINDENT
84 .UNINDENT
85 .sp
86 Configuration files follow the \fBINI\fP format and consist of sections denoted by headers
87 in square brackets. Each section can include various options.
88 .sp
89 Models and servers must have unique identifiers, and reserved words cannot be used as
90 names.
91 .sp
92 \fBNote:\fP
93 .INDENT 0.0
94 .INDENT 3.5
95 \fBComment Handling\fP: Only line comments are supported (lines starting with \fB#\fP or \fB;\fP).
96 Inline comments (\fB#\fP or \fB;\fP appearing after configuration values on the same line) are
97 not supported and will be parsed as part of the configuration value, which may
98 cause unexpected behavior.
99 .UNINDENT
100 .UNINDENT
101 .sp
102 \fBReserved Words\fP
103 .sp
104 The following reserved words cannot be used as server or model names:
105 .INDENT 0.0
106 .IP \(bu 2
107 \fBbarman\fP: Identifies the global section.
108 .IP \(bu 2
109 \fBall\fP: A special shortcut for executing commands on all managed servers.
110 .UNINDENT
111 .sp
112 \fBParameter Types\fP
113 .sp
114 Configuration options can be of the following types:
115 .INDENT 0.0
116 .IP \(bu 2
117 \fBString\fP: Textual data (e.g., file paths, names).
118 .IP \(bu 2
119 \fBEnum\fP: Enumerated values, often limited to predefined choices.
120 .IP \(bu 2
121 \fBInteger\fP: Numeric values.
122 .IP \(bu 2
123 \fBBoolean\fP: Can be \fBon\fP, \fBtrue\fP, \fB1\fP (true) or \fBoff\fP, \fBfalse\fP, \fB0\fP
124 (false).
125 .sp
126 \fBNote:\fP
127 .INDENT 2.0
128 .INDENT 3.5
129 Some enums allow \fBoff\fP, but not \fBfalse\fP\&.
130 .UNINDENT
131 .UNINDENT
132 .UNINDENT
133 .SH OPTIONS
134 .sp
135 Options in the configuration files can have specific or shared scopes. The following
136 configuration options are used not only for configuring how Barman will execute backups
137 and recoveries, but also for configuring various aspects of how Barman interacts with the
138 configured Postgres servers to be able to apply your Backup and Recovery, and
139 High\-Availability strategies.
140 .SS General
141 .sp
142 These are general configurations options.
143 .sp
144 \fBactive\fP
145 .sp
146 When this option is set to \fBtrue\fP (default), the server operates fully. If set to
147 \fBfalse\fP, the server is restricted to operations that don\(aqt ingest new data. This
148 means that operational commands such as backup execution or WAL archiving are
149 temporarily disabled.
150 .sp
151 When incorporating a new server into Barman, we recommend initially setting
152 \fBactive = false\fP\&. Verify that barman check shows no issues before activating the
153 server. This approach helps prevent excessive error logging in Barman during the
154 initial setup.
155 .sp
156 \fBImportant:\fP
157 .INDENT 0.0
158 .INDENT 3.5
159 Setting \fBactive = false\fP for a server disables operational commands (such as
160 \fBbackup\fP, \fBput\-wal\fP, \fBreceive\-wal\fP, and cron\-driven actions) for that server.
161 Diagnostics and read\-only commands (like \fBcheck\fP, \fBlist\-backups\fP, \fBstatus\fP,
162 \fBshow\-servers\fP, \fBdiagnose\fP, \fBlist\-processes\fP, and some options for
163 \fBreceive\-wal\fP maintenance subcommands) remain available.
164 .sp
165 If the server is marked as inactive, \fBbarman cron\fP will kill any background
166 \fBreceive\-wal\fP processes and skip any other tasks.
167 .UNINDENT
168 .UNINDENT
169 .sp
170 Scope: Server / Model.
171 .sp
172 \fBarchiver\fP
173 .sp
174 This option enables log file shipping through Postgres\(aq \fBarchive_command\fP for a
175 server. When set to \fBtrue\fP, Barman expects continuous archiving to be configured and
176 will manage WAL files that Postgres stores in the incoming directory
177 (\fBincoming_wals_directory\fP), including their checks, handling, and compression. When
178 set to \fBfalse\fP (default), continuous archiving is disabled.
179 .sp
180 \fBNote:\fP
181 .INDENT 0.0
182 .INDENT 3.5
183 If neither \fBarchiver\fP nor \fBstreaming_archiver\fP is configured, Barman will
184 automatically set this option to \fBtrue\fP to maintain compatibility with the
185 previous default behavior where archiving was enabled by default.
186 .UNINDENT
187 .UNINDENT
188 .sp
189 Scope: Global / Server / Model.
190 .sp
191 \fBarchiver_batch_size\fP
192 .sp
193 This option enables batch processing of WAL files for the archiver process by setting
194 it to a value greater than \fB0\fP\&. If not set, the archiver will use unlimited
195 (default) processing mode for the WAL queue. With batch processing enabled, the
196 archiver process will handle a maximum of \fBarchiver_batch_size\fP WAL segments per
197 run. This value must be an integer.
198 .sp
199 Scope: Global / Server / Model.
200 .sp
201 \fBbandwidth_limit\fP
202 .sp
203 Specifies the maximum transfer rate in kilobytes per second for backup and recovery
204 operations. A value of \fB0\fP indicates no limit (default).
205 .sp
206 \fBNote:\fP
207 .INDENT 0.0
208 .INDENT 3.5
209 Applies only when \fBbackup_method = postgres | rsync | local\-to\-cloud\fP\&.
210 .UNINDENT
211 .UNINDENT
212 .sp
213 Scope: Global / Server / Model.
214 .sp
215 \fBbarman_home\fP
216 .sp
217 Designates the main data directory for Barman. Defaults to \fB/var/lib/barman\fP\&.
218 .sp
219 Scope: Global.
220 .sp
221 \fBbarman_lock_directory\fP
222 .sp
223 Specifies the directory for lock files. The default is \fBbarman_home\fP\&.
224 .sp
225 \fBNote:\fP
226 .INDENT 0.0
227 .INDENT 3.5
228 The \fBbarman_lock_directory\fP should be on a non\-network local filesystem. If using
229 NFS, or any other network filesystem to store the backups and WAL files, make sure
230 that the lock directory lives in a local filesystem.
231 .UNINDENT
232 .UNINDENT
233 .sp
234 Scope: Global.
235 .sp
236 \fBcheck_timeout\fP
237 .sp
238 Sets the maximum execution time in seconds for a Barman check command per server. Set
239 to \fB0\fP to disable the timeout. Default is \fB30\fP seconds. Must be a non\-negative
240 integer.
241 .sp
242 Scope: Global / Server / Model.
243 .sp
244 \fBcluster\fP
245 .sp
246 Tag the server or model to an associated cluster name. Barman uses this association to
247 override configuration for all servers/models in this cluster. If omitted for servers,
248 it defaults to the server\(aqs name.
249 .sp
250 \fBNote:\fP
251 .INDENT 0.0
252 .INDENT 3.5
253 Must be specified for configuration models to group applicable servers.
254 .UNINDENT
255 .UNINDENT
256 .sp
257 Scope: Server / Model.
258 .sp
259 \fBconfig_changes_queue\fP
260 .sp
261 Designates the filesystem location for Barman\(aqs queue that handles configuration changes
262 requested via the barman \fBconfig\-update\fP command. This queue manages the
263 serialization and retry of configuration change requests. By default, Barman writes to
264 a file named \fBcfg_changes.queue\fP under \fBbarman_home\fP\&.
265 .sp
266 Scope: Global.
267 .sp
268 \fBconfiguration_files_directory\fP
269 .sp
270 Designates the directory where server/model configuration files will be read by Barman.
271 Defaults to \fB/etc/barman.d/\fP\&.
272 .sp
273 Scope: Global.
274 .sp
275 \fBconninfo\fP
276 .sp
277 Specifies the connection string used by Barman to connect to the Postgres server.
278 This is a libpq connection string. Commonly used keys include: \fBhost\fP, \fBhostaddr\fP,
279 \fBport\fP, \fBdbname\fP, \fBuser\fP and \fBpassword\fP\&. See the
280 libpq\-connstring \%<https://\:www\:.postgresql\:.org/\:docs/\:current/\:libpq-connect\:.html#\:LIBPQ-CONNSTRING>
281 PostgreSQL documentation for details.
282 .sp
283 \fBNote:\fP
284 .INDENT 0.0
285 .INDENT 3.5
286 Multi\-host connection strings (e.g. \fBhost=primary_db,replica_db\fP) and
287 \fBtarget_session_attrs\fP are not supported. Each connection string must point
288 to a single, specific host.
289 .UNINDENT
290 .UNINDENT
291 .sp
292 Scope: Server / Model.
293 .sp
294 \fBcreate_slot\fP
295 .sp
296 Determines whether Barman should automatically create a replication slot if it\(aqs not
297 already present for streaming WAL files. When set to \fBauto\fP and \fBslot_name\fP is
298 defined, Barman will attempt to create the slot automatically. When set to \fBmanual\fP
299 (default), the replication slot must be created manually.
300 .sp
301 Scope: Global / Server / Model.
302 .sp
303 \fBdescription\fP
304 .sp
305 Provides a human\-readable description of a server.
306 .sp
307 Scope: Server / Model.
308 .sp
309 \fBerrors_directory\fP
310 .sp
311 The directory where WAL files that were errored while being archived by Barman are
312 stored. This includes duplicate WAL files (e.g., an archived WAL file that has already
313 been streamed but have different hash) and unexpected files found in the WAL archive
314 directory.
315 .sp
316 The purpose of placing the files in this directory is so someone can later review why they
317 failed to be archived and take appropriate actions (dispose of, store somewhere else,
318 replace the duplicate file archived before, etc.)
319 .sp
320 Scope: Server.
321 .sp
322 \fBencryption\fP
323 .sp
324 Specifies the encryption method used for encrypting backups and WAL files. Supported
325 values are:
326 .INDENT 0.0
327 .IP \(bu 2
328 \fBnone\fP (default): No encryption is applied.
329 .IP \(bu 2
330 \fBgpg\fP: Uses GPG \%<#\:term-GPG> for encryption. Requires GPG \%<#\:term-GPG> to be installed
331 and properly configured on the system.
332 .UNINDENT
333 .sp
334 Scope: Global / Server / Model.
335 .sp
336 \fBencryption_key_id\fP
337 .sp
338 Specifies the encryption key ID used for encrypting backups and WAL files. This option
339 is required when \fBencryption = gpg\fP and must correspond to a valid GPG \%<#\:term-GPG> key ID
340 available on the system.
341 .sp
342 Scope: Global / Server / Model.
343 .sp
344 \fBencryption_passphrase_command\fP
345 .sp
346 Specifies a command used to retrieve the encryption passphrase for decrypting
347 backups and WAL files. The command must write the passphrase to standard output.
348 .sp
349 Scope: Global / Server / Model.
350 .sp
351 \fBforward_config_path\fP
352 .sp
353 Determines whether a passive node should forward its configuration file path to its
354 primary node during \fBcron\fP or \fBsync\-info\fP commands. Set to \fBtrue\fP if Barman is
355 invoked with the \fB\-c\fP / \fB\-\-config\fP option and the configuration paths are identical
356 on both passive and primary Barman servers. Defaults to \fBfalse\fP\&.
357 .sp
358 Scope: Global / Server / Model.
359 .sp
360 \fBimmediate_checkpoint\fP
361 .sp
362 Controls how Postgres handles checkpoints at the start of a backup. Set to \fBfalse\fP
363 (default) to allow the checkpoint to complete according to
364 \fBcheckpoint_completion_target\fP\&. Set to \fBtrue\fP for an immediate checkpoint, where
365 Postgres completes the checkpoint as quickly as possible.
366 .sp
367 Scope: Global / Server / Model.
368 .sp
369 \fBkeepalive_interval\fP
370 .sp
371 Sets the interval in seconds for sending a heartbeat query to keep the libpq
372 connection active during an rsync backup. Default is \fB60\fP seconds. Setting this to
373 \fB0\fP disables the heartbeat.
374 .sp
375 Scope: Global / Server / Model.
376 .sp
377 \fBlock_directory_cleanup\fP
378 .sp
379 Enables automatic cleanup of unused lock files in the \fBbarman_lock_directory\fP\&.
380 .sp
381 Scope: Global.
382 .sp
383 \fBlog_file\fP
384 .sp
385 Specifies the location of Barman\(aqs log file. Defaults to \fB/var/log/barman/barman.log\fP\&.
386 .sp
387 Scope: Global.
388 .sp
389 \fBlog_level\fP
390 .sp
391 Sets the level of logging. Options include: \fBDEBUG\fP, \fBINFO\fP, \fBWARNING\fP,
392 \fBERROR\fP and \fBCRITICAL\fP\&.
393 .sp
394 Scope: Global.
395 .sp
396 \fBminimum_redundancy\fP
397 .sp
398 Specifies the minimum number of backups to retain. Default is \fB0\fP\&.
399 .sp
400 Scope: Global / Server / Model.
401 .sp
402 \fBmodel\fP
403 .sp
404 When set to \fBtrue\fP, turns a server section from a configuration file into a model for
405 a cluster. There is no \fBfalse\fP option in this case. If you want to simulate a
406 \fBfalse\fP option, comment out (\fB#model=true\fP) or remove the option in the
407 configuration. Defaults to the server name.
408 .sp
409 Scope: Model.
410 .sp
411 \fBnetwork_compression\fP
412 .sp
413 Enables or disables data compression for network transfers. Set to \fBfalse\fP (default)
414 to disable compression, or \fBtrue\fP to enable it and reduce network usage.
415 .sp
416 Scope: Global / Server / Model.
417 .sp
418 \fBparallel_jobs\fP
419 .sp
420 Controls the number of parallel workers used to copy files during backup or recovery.
421 It must be a positive integer. Default is \fB1\fP\&.
422 .sp
423 \fBNote:\fP
424 .INDENT 0.0
425 .INDENT 3.5
426 Applies only when \fBbackup_method = rsync\fP\&.
427 .UNINDENT
428 .UNINDENT
429 .sp
430 Scope: Global / Server / Model.
431 .sp
432 \fBparallel_jobs_start_batch_period\fP
433 .sp
434 Specifies the time interval in seconds over which a single batch of parallel jobs will
435 start. Default is \fB1\fP second. This means that if \fBparallel_jobs_start_batch_size\fP
436 is \fB10\fP and \fBparallel_jobs_start_batch_period\fP is \fB1\fP, this will yield an
437 effective rate limit of \fB10\fP jobs per second, because there is a maximum of \fB10\fP
438 jobs that can be started within \fB1\fP second.
439 .sp
440 \fBNote:\fP
441 .INDENT 0.0
442 .INDENT 3.5
443 Applies only when \fBbackup_method = rsync\fP\&.
444 .UNINDENT
445 .UNINDENT
446 .sp
447 Scope: Global / Server / Model.
448 .sp
449 \fBparallel_jobs_start_batch_size\fP
450 .sp
451 Defines the maximum number of parallel jobs to start in a single batch. Default is
452 \fB10\fP jobs. This means that if \fBparallel_jobs_start_batch_size\fP
453 is \fB10\fP and \fBparallel_jobs_start_batch_period\fP is \fB2\fP, this will yield a maximum
454 of \fB10\fP jobs that can be started within \fB2\fP seconds.
455 .sp
456 \fBNote:\fP
457 .INDENT 0.0
458 .INDENT 3.5
459 Applies only when \fBbackup_method = rsync\fP\&.
460 .UNINDENT
461 .UNINDENT
462 .sp
463 Scope: Global / Server / Model.
464 .sp
465 \fBpath_prefix\fP
466 .sp
467 Lists one or more absolute paths, separated by colons, where Barman looks for executable
468 files such as PostgreSQL binaries (from the appropriate \fBbin\fP directory for the
469 \fBPG_MAJOR_VERSION\fP), \fBrsync\fP, encryption, and compression tools. These paths are
470 prepended to the \fBPATH\fP environment variable and are checked before any others.
471 .sp
472 Scope: Global / Server / Model.
473 .sp
474 \fBprimary_checkpoint_timeout\fP
475 .sp
476 Time to wait for new WAL files before forcing a checkpoint on the primary server.
477 Defaults to \fB0\fP\&.
478 .sp
479 Scope: Server / Model.
480 .sp
481 \fBprimary_conninfo\fP
482 .sp
483 Connection string for Barman to connect to the primary Postgres server during a
484 standby backup.
485 .sp
486 \fBNote:\fP
487 .INDENT 0.0
488 .INDENT 3.5
489 Multi\-host connection strings are not supported. See \fBconninfo\fP for details.
490 .UNINDENT
491 .UNINDENT
492 .sp
493 Scope: Server / Model.
494 .sp
495 \fBprimary_ssh_command\fP
496 .sp
497 SSH command for connecting to the primary Barman server if Barman is passive.
498 .sp
499 Scope: Global / Server / Model.
500 .sp
501 \fBslot_name\fP
502 .sp
503 Replication slot name for the \fBreceive\-wal\fP command when \fBstreaming_archiver\fP is
504 enabled.
505 .sp
506 Scope: Global / Server / Model.
507 .sp
508 \fBssh_command\fP
509 .sp
510 SSH command used by Barman to connect to the Postgres server for rsync backups.
511 .sp
512 Scope: Server / Model.
513 .sp
514 \fBstreaming_archiver\fP
515 .sp
516 Enables Postgres\(aq streaming protocol for WAL files. Defaults to \fBfalse\fP\&.
517 .sp
518 \fBNote:\fP
519 .INDENT 0.0
520 .INDENT 3.5
521 If neither \fBarchiver\fP nor \fBstreaming_archiver\fP is configured, Barman will
522 automatically set \fBarchiver\fP option to \fBtrue\fP to maintain compatibility with the
523 previous default behavior where archiving was enabled by default.
524 .UNINDENT
525 .UNINDENT
526 .sp
527 Scope: Global / Server / Model.
528 .sp
529 \fBstreaming_archiver_batch_size\fP
530 .sp
531 Batch size for processing WAL files in streaming archiver. Defaults to \fB0\fP\&.
532 .sp
533 Scope: Global / Server / Model.
534 .sp
535 \fBstreaming_archiver_name\fP
536 .sp
537 Application name for the \fBreceive\-wal\fP command. Defaults to \fBbarman_receive_wal\fP\&.
538 .sp
539 Scope: Global / Server / Model.
540 .sp
541 \fBstreaming_backup_name\fP
542 .sp
543 Application name for the \fBpg_basebackup\fP command. Defaults to
544 \fBbarman_streaming_backup\fP\&.
545 .sp
546 Scope: Global / Server / Model.
547 .sp
548 \fBstreaming_conninfo\fP
549 .sp
550 Connection string for streaming replication protocol. Defaults to \fBconninfo\fP\&.
551 .sp
552 \fBNote:\fP
553 .INDENT 0.0
554 .INDENT 3.5
555 Multi\-host connection strings are not supported. See \fBconninfo\fP for details.
556 .UNINDENT
557 .UNINDENT
558 .sp
559 Scope: Server / Model.
560 .sp
561 \fBtablespace_bandwidth_limit\fP
562 .sp
563 Maximum transfer rate for specific tablespaces for backup and recovery operations.
564 A value of \fB0\fP indicates no limit (default).
565 .sp
566 \fBNote:\fP
567 .INDENT 0.0
568 .INDENT 3.5
569 Applies only when \fBbackup_method = rsync\fP\&.
570 .UNINDENT
571 .UNINDENT
572 .sp
573 Scope: Global / Server / Model.
574 .SS Backups
575 .sp
576 These configurations options are related to how Barman will execute backups.
577 .sp
578 \fBautogenerate_manifest\fP
579 .sp
580 This is a boolean option that allows for the automatic creation of backup manifest
581 files. The manifest file, which is a JSON document, lists all files included in the
582 backup. It is generated upon completion of the backup and saved in the backup
583 directory. The format of the manifest file adheres to the specifications outlined in the
584 backup manifest format \%<https://\:www\:.postgresql\:.org/\:docs/\:current/\:backup-manifest-format\:.html>
585 PostgreSQL documentation and is compatible with the \fBpg_verifybackup\fP tool. Default is \fBfalse\fP\&.
586 .sp
587 \fBNote:\fP
588 .INDENT 0.0
589 .INDENT 3.5
590 This option is ignored if the \fBbackup_method\fP is not \fBrsync\fP\&.
591 .UNINDENT
592 .UNINDENT
593 .sp
594 Scope: Global / Server / Model.
595 .sp
596 \fBbackup_compression\fP
597 .sp
598 Specifies the compression method for the backup process. It can be set to \fBgzip\fP,
599 \fBlz4\fP, \fBzstd\fP, or \fBnone\fP\&. Ensure that the CLI tool for the chosen compression
600 method is available on both the Barman and Postgres servers.
601 .sp
602 \fBNote:\fP
603 .INDENT 0.0
604 .INDENT 3.5
605 Note that \fBlz4\fP and \fBzstd\fP require Postgres version 15 or later. Unsetting this
606 option or using \fBnone\fP results in an uncompressed archive (default). Only
607 supported when \fBbackup_method = postgres\fP\&.
608 .UNINDENT
609 .UNINDENT
610 .sp
611 Scope: Global / Server / Model.
612 .sp
613 \fBbackup_compression_format\fP
614 .sp
615 Determines the format \fBpg_basebackup\fP should use when saving compressed backups.
616 Options are \fBplain\fP or \fBtar\fP, with \fBtar\fP as the default if unset. The \fBplain\fP
617 format is available only if Postgres version 15 or later is in use and
618 \fBbackup_compression_location\fP is set to \fBserver\fP\&.
619 .sp
620 \fBNote:\fP
621 .INDENT 0.0
622 .INDENT 3.5
623 Only supported when \fBbackup_method = postgres\fP\&.
624 .UNINDENT
625 .UNINDENT
626 .sp
627 Scope: Global / Server / Model.
628 .sp
629 \fBbackup_compression_level\fP
630 .sp
631 Defines the level of compression for backups as an integer. The permissible values
632 depend on the compression method specified in \fBbackup_compression\fP\&.
633 .sp
634 \fBNote:\fP
635 .INDENT 0.0
636 .INDENT 3.5
637 Only supported when \fBbackup_method = postgres\fP\&.
638 .UNINDENT
639 .UNINDENT
640 .sp
641 Scope: Global / Server / Model.
642 .sp
643 \fBbackup_compression_location\fP
644 .sp
645 Specifies where compression should occur during the backup: either \fBclient\fP or
646 \fBserver\fP\&. The \fBserver\fP option is available only if Postgres version 15 or later is
647 being used.
648 .sp
649 \fBNote:\fP
650 .INDENT 0.0
651 .INDENT 3.5
652 Only supported when \fBbackup_method = postgres\fP\&.
653 .UNINDENT
654 .UNINDENT
655 .sp
656 Scope: Global / Server / Model.
657 .sp
658 \fBbackup_compression_workers\fP
659 .sp
660 Sets the number of threads used for compression during the backup process. This is
661 applicable only when \fBbackup_compression=zstd\fP\&. The default value is 0, which uses
662 the standard compression behavior.
663 .sp
664 \fBNote:\fP
665 .INDENT 0.0
666 .INDENT 3.5
667 Only supported when \fBbackup_method = postgres\fP\&.
668 .UNINDENT
669 .UNINDENT
670 .sp
671 Scope: Global / Server / Model.
672 .sp
673 \fBwarehousepg_dbid\fP
674 .sp
675 Specifies the integer identifier for a WarehousePG database. When set, this value is
676 passed to \fBpg_basebackup\fP via the \fB\-\-target\-gp\-dbid\fP parameter for WarehousePG
677 compatibility. This option is required when backing up WarehousePG segments.
678 .sp
679 \fBImportant:\fP
680 .INDENT 0.0
681 .INDENT 3.5
682 This option is only relevant for WarehousePG databases and should not be set for
683 standard PostgreSQL databases.
684 .sp
685 Furthermore, Barman does not handle backups and restores for WarehousePG clusters.
686 The orchestration of backup and restore operations for WarehousePG clusters must be
687 managed externally by the user.
688 .UNINDENT
689 .UNINDENT
690 .sp
691 \fBNote:\fP
692 .INDENT 0.0
693 .INDENT 3.5
694 Only supported when \fBbackup_method = postgres\fP\&.
695 .UNINDENT
696 .UNINDENT
697 .sp
698 Scope: Global / Server / Model.
699 .sp
700 \fBbackup_directory\fP
701 .sp
702 Specifies the directory where backup data for a server will be stored. Defaults to
703 \fB<barman_home>/<server_name>\fP\&.
704 .sp
705 Scope: Server.
706 .sp
707 \fBbackup_method\fP
708 .sp
709 Defines the method Barman uses to perform backups. Options include:
710 .INDENT 0.0
711 .IP \(bu 2
712 \fBrsync\fP (default): Executes backups using the rsync command over SSH (requires
713 \fBssh_command\fP).
714 .IP \(bu 2
715 \fBpostgres\fP: Uses the \fBpg_basebackup\fP command for backups.
716 .IP \(bu 2
717 \fBlocal\-rsync\fP: Assumes Barman runs on the same server and as the same user as
718 the Postgres database, performing an rsync file system copy.
719 .IP \(bu 2
720 \fBsnapshot\fP: Utilizes the API of the cloud provider specified in the
721 \fBsnapshot_provider\fP option to create disk snapshots as defined in
722 \fBsnapshot_disks\fP and saves only the backup label and metadata to its own
723 storage.
724 .UNINDENT
725 .sp
726 Scope: Global / Server / Model.
727 .sp
728 \fBbackup_options\fP
729 .sp
730 Controls how Barman interacts with Postgres during backups. This is a comma\-separated
731 list that can include:
732 .INDENT 0.0
733 .IP \(bu 2
734 \fBconcurrent_backup\fP (default): Uses concurrent backup, recommended for
735 Postgres versions 9.6 and later, and supports backups from standby servers.
736 .IP \(bu 2
737 \fBexclusive_backup\fP: Uses the deprecated exclusive backup method. Only for Postgres
738 versions older than 15. This option will be removed in the future.
739 .IP \(bu 2
740 \fBexternal_configuration\fP: Suppresses warnings about external configuration files
741 during backup execution.
742 .UNINDENT
743 .sp
744 \fBNote:\fP
745 .INDENT 0.0
746 .INDENT 3.5
747 \fBexclusive_backup\fP and \fBconcurrent_backup\fP cannot be used together.
748 .UNINDENT
749 .UNINDENT
750 .sp
751 Scope: Global / Server / Model.
752 .sp
753 \fBbasebackups_directory\fP
754 .sp
755 Destination for base backup files. It can be a local path if storing backups locally,
756 or a cloud storage URL if streaming backups to the cloud as described in
757 Streaming backups to the cloud \%<#\:backup-streaming-backup-cloud>\&. Defaults to \fB<backup_directory>/base\fP\&.
758 .sp
759 \fBWarning:\fP
760 .INDENT 0.0
761 .INDENT 3.5
762 Changing the value of \fBbasebackups_directory\fP on an active server is discouraged.
763 Even if done with care, by deactivating the server, moving existing data to the new
764 location, and reactivating it, there are potential risks of data loss or
765 misconfiguration.
766 .sp
767 Instead, the safe option is to create a new server configuration with the new value
768 for \fBbasebackups_directory\fP, perform a new full backup to the new server, and then
769 decommission the old server once the new one is fully operational.
770 .UNINDENT
771 .UNINDENT
772 .sp
773 Scope: Server.
774 .sp
775 \fBbasebackup_retry_sleep\fP
776 .sp
777 Sets the number of seconds to wait after a failed base backup copy before retrying.
778 Default is \fB30\fP seconds. Must be a non\-negative integer.
779 .sp
780 \fBNote:\fP
781 .INDENT 0.0
782 .INDENT 3.5
783 This applies to both backup and recovery operations.
784 .UNINDENT
785 .UNINDENT
786 .sp
787 Scope: Global / Server / Model.
788 .sp
789 \fBbasebackup_retry_times\fP
790 .sp
791 Defines the number of retry attempts for a base backup copy after an error occurs.
792 Default is \fB0\fP (no retries). Must be a non\-negative integer.
793 .sp
794 \fBNote:\fP
795 .INDENT 0.0
796 .INDENT 3.5
797 This applies to both backup and recovery operations.
798 .UNINDENT
799 .UNINDENT
800 .sp
801 Scope: Global / Server / Model.
802 .sp
803 \fBreuse_backup\fP
804 .sp
805 Controls incremental backup support when using \fBbackup_method=rsync\fP by reusing the
806 last available backup. The options are:
807 .INDENT 0.0
808 .IP \(bu 2
809 \fBoff\fP (default): Standard full backup.
810 .IP \(bu 2
811 \fBcopy\fP: File\-level incremental backup, by reusing the last backup for a server and
812 creating a copy of the unchanged files (just for backup time reduction)
813 .IP \(bu 2
814 \fBlink\fP: File\-level incremental backup, by reusing the last backup for a server and
815 creating a hard link of the unchanged files (for backup space and time reduction)
816 .UNINDENT
817 .sp
818 \fBNote:\fP
819 .INDENT 0.0
820 .INDENT 3.5
821 This option will be ignored when \fBbackup_method=postgres\fP\&.
822 .UNINDENT
823 .UNINDENT
824 .sp
825 Scope: Global / Server / Model.
826 .sp
827 \fBworm_mode\fP
828 .sp
829 If set to \fBon\fP, enables support for WORM (Write Once Read Many) storage, allowing
830 Barman to handle backups on immutable storage correctly. Default is \fBoff\fP\&.
831 .sp
832 Scope: Global / Server / Model.
833 .SS Cloud Backups
834 .sp
835 These configuration options are related to how Barman will execute backups in the cloud.
836 .sp
837 \fBaws_await_snapshots_timeout\fP
838 .sp
839 Specifies the duration in seconds to wait for AWS snapshots to be created before a
840 timeout occurs. The default value is \fB3600\fP seconds. This must be a positive
841 integer.
842 .sp
843 \fBNote:\fP
844 .INDENT 0.0
845 .INDENT 3.5
846 Only supported when \fBbackup_method = snapshot\fP and \fBsnapshot_provider = aws\fP\&.
847 .UNINDENT
848 .UNINDENT
849 .sp
850 Scope: Global / Server / Model.
851 .sp
852 \fBaws_profile\fP
853 .sp
854 The name of the AWS profile to use when authenticating with AWS (e.g. \fBINI\fP section
855 in AWS credentials file).
856 .sp
857 \fBNote:\fP
858 .INDENT 0.0
859 .INDENT 3.5
860 Only supported when \fBbackup_method = snapshot\fP and \fBsnapshot_provider = aws\fP, or
861 when \fBbackup_method\fP is \fBpostgres\fP or \fBlocal\-to\-cloud\fP and
862 \fBbasebackups_directory\fP and/or \fBwals_directory\fP point to S3.
863 .UNINDENT
864 .UNINDENT
865 .sp
866 Scope: Global / Server / Model.
867 .sp
868 \fBaws_region\fP
869 .sp
870 When using \fBbackup_method = snapshot\fP, indicates the AWS region where the EC2 VM and
871 storage volumes, as defined by \fBsnapshot_instance\fP and \fBsnapshot_disks\fP, are
872 located.
873 .sp
874 When using \fBbackup_method = postgres\fP or \fBlocal\-to\-cloud\fP pointing to S3, indicates
875 the AWS region where the S3 bucket is located.
876 .sp
877 \fBNote:\fP
878 .INDENT 0.0
879 .INDENT 3.5
880 Only supported when \fBbackup_method = snapshot\fP and \fBsnapshot_provider = aws\fP, or
881 when \fBbackup_method\fP is \fBpostgres\fP or \fBlocal\-to\-cloud\fP and
882 \fBbasebackups_directory\fP and/or \fBwals_directory\fP point to S3.
883 .UNINDENT
884 .UNINDENT
885 .sp
886 Scope: Global / Server / Model.
887 .sp
888 \fBaws_check_object_lock\fP
889 .sp
890 When set to \fBtrue\fP, Barman will check for S3 Object Lock before attempting to
891 delete base backup files from S3 storage. If an object is locked, the deletion
892 is aborted. Defaults to \fBfalse\fP\&.
893 .sp
894 \fBNote:\fP
895 .INDENT 0.0
896 .INDENT 3.5
897 Only supported when \fBbackup_method\fP is \fBpostgres\fP or \fBlocal\-to\-cloud\fP,
898 and \fBbasebackups_directory\fP points to S3. If enabled with a non\-S3 provider,
899 a warning will be logged and no lock checks will be performed.
900 .UNINDENT
901 .UNINDENT
902 .sp
903 Scope: Global / Server / Model.
904 .sp
905 \fBaws_encryption\fP
906 .sp
907 Specifies the server\-side encryption algorithm to use when storing objects in S3.
908 This value is passed to the S3 client for all upload operations to cloud object storage.
909 .sp
910 Allowed options:
911 .INDENT 0.0
912 .IP \(bu 2
913 \fBAES256\fP: Use S3\-managed encryption keys (SSE\-S3).
914 .IP \(bu 2
915 \fBaws:kms\fP: Use AWS Key Management Service encryption keys (SSE\-KMS).
916 .UNINDENT
917 .sp
918 If not set, S3\(aqs default encryption settings for the bucket will be used.
919 .sp
920 \fBNote:\fP
921 .INDENT 0.0
922 .INDENT 3.5
923 Only supported when \fBbackup_method\fP is \fBpostgres\fP or \fBlocal\-to\-cloud\fP, and
924 \fBbasebackups_directory\fP and/or \fBwals_directory\fP point to S3.
925 .UNINDENT
926 .UNINDENT
927 .sp
928 Scope: Global / Server / Model.
929 .sp
930 \fBaws_sse_kms_key_id\fP
931 .sp
932 Specifies the AWS Key Management Service (KMS) key ID to use for server\-side
933 encryption of S3 objects. This option is only valid when \fBaws_encryption\fP is
934 set to \fBaws:kms\fP\&.
935 .sp
936 Can be specified using the key ID on its own or using the full ARN for the key.
937 .sp
938 If not set when using \fBaws_encryption = aws:kms\fP, S3 will use the default AWS
939 managed KMS key for S3.
940 .sp
941 Example:
942 .INDENT 0.0
943 .INDENT 3.5
944 .sp
945 .EX
946 [myserver]
947 backup_method = local\-to\-cloud
948 basebackups_directory = s3://my\-bucket/barman/backups
949 aws_encryption = aws:kms
950 aws_sse_kms_key_id = arn:aws:kms:us\-east\-1:123456789012:key/abcd1234\-5678\-90ab\-cdef\-EXAMPLEKEY
951 .EE
952 .UNINDENT
953 .UNINDENT
954 .sp
955 \fBNote:\fP
956 .INDENT 0.0
957 .INDENT 3.5
958 Only supported when \fBbackup_method\fP is \fBpostgres\fP or \fBlocal\-to\-cloud\fP, and
959 \fBbasebackups_directory\fP and/or \fBwals_directory\fP point to S3.
960 .UNINDENT
961 .UNINDENT
962 .sp
963 Scope: Global / Server / Model.
964 .sp
965 \fBaws_sse_customer_key\fP
966 .sp
967 Specifies a customer\-provided encryption key for AWS S3 SSE\-C (Server\-Side
968 Encryption with Customer Keys). The value must be a \fBfile://\fP URI pointing to a file
969 containing a base64\-encoded 256\-bit (32\-byte) key.
970 .sp
971 When set, Barman passes the key to boto3 for all upload and download operations,
972 including base backups and WAL files. The same key must be provided for both
973 backup and restore operations.
974 .sp
975 Cannot be used together with \fBaws_encryption\fP or \fBaws_sse_kms_key_id\fP\&.
976 .sp
977 Example:
978 .INDENT 0.0
979 .INDENT 3.5
980 .sp
981 .EX
982 [myserver]
983 backup_method = local\-to\-cloud
984 basebackups_directory = s3://my\-bucket/barman/backups
985 aws_sse_customer_key = file:///etc/barman/sse\-c.b64
986 .EE
987 .UNINDENT
988 .UNINDENT
989 .sp
990 \fBImportant:\fP
991 .INDENT 0.0
992 .INDENT 3.5
993 All backups and WAL files for a given server must be encrypted with the same SSE\-C
994 key. Mixing SSE\-C\-encrypted and unencrypted objects, or using different keys across
995 backups, will cause barman commands to fail when S3 rejects requests with a
996 mismatched or missing key.
997 .UNINDENT
998 .UNINDENT
999 .sp
1000 \fBNote:\fP
1001 .INDENT 0.0
1002 .INDENT 3.5
1003 Only supported when \fBbackup_method\fP is \fBpostgres\fP or \fBlocal\-to\-cloud\fP, and
1004 \fBbasebackups_directory\fP and/or \fBwals_directory\fP point to S3.
1005 .UNINDENT
1006 .UNINDENT
1007 .sp
1008 Scope: Global / Server / Model.
1009 .sp
1010 \fBaws_read_timeout\fP
1011 .sp
1012 Specifies the read timeout in seconds for S3 operations when using cloud storage.
1013 This value is passed to the S3 client for all commands that interact with backup
1014 data on cloud object storage. If not set, the default boto3 read timeout behavior
1015 applies.
1016 .sp
1017 This option is useful for advanced and non\-standard S3 workflows where the default
1018 timeout may not be sufficient.
1019 .sp
1020 \fBNote:\fP
1021 .INDENT 0.0
1022 .INDENT 3.5
1023 Only supported when \fBbackup_method\fP is \fBpostgres\fP or \fBlocal\-to\-cloud\fP, and
1024 \fBbasebackups_directory\fP and/or \fBwals_directory\fP point to S3.
1025 .UNINDENT
1026 .UNINDENT
1027 .sp
1028 Scope: Global / Server / Model.
1029 .sp
1030 \fBaws_snapshot_lock_mode\fP
1031 .sp
1032 The lock mode for the snapshot. This is only valid if \fBsnapshot_instance\fP and
1033 \fBsnapshot_disk\fP are set.
1034 .sp
1035 Allowed options:
1036 .INDENT 0.0
1037 .IP \(bu 2
1038 \fBcompliance\fP\&.
1039 .IP \(bu 2
1040 \fBgovernance\fP\&.
1041 .UNINDENT
1042 .sp
1043 \fBNote:\fP
1044 .INDENT 0.0
1045 .INDENT 3.5
1046 Only supported when \fBbackup_method = snapshot\fP and \fBsnapshot_provider = aws\fP\&.
1047 .UNINDENT
1048 .UNINDENT
1049 .sp
1050 Scope: Global / Server / Model.
1051 .sp
1052 \fBaws_snapshot_lock_duration\fP
1053 .sp
1054 The lock duration is the period of time (in days) for which the snapshot is to remain
1055 locked, ranging from 1 to 36,500. Set either the lock duration or the expiration date
1056 (not both).
1057 .sp
1058 \fBNote:\fP
1059 .INDENT 0.0
1060 .INDENT 3.5
1061 Only supported when \fBbackup_method = snapshot\fP and \fBsnapshot_provider = aws\fP\&.
1062 .UNINDENT
1063 .UNINDENT
1064 .sp
1065 Scope: Global / Server / Model.
1066 .sp
1067 \fBaws_snapshot_lock_cool_off_period\fP
1068 .sp
1069 The cooling\-off period is an optional period of time (in hours) that you can specify
1070 when you lock a snapshot in \fBcompliance\fP mode, ranging from 1 to 72.
1071 .sp
1072 \fBNote:\fP
1073 .INDENT 0.0
1074 .INDENT 3.5
1075 Only supported when \fBbackup_method = snapshot\fP and \fBsnapshot_provider = aws\fP\&.
1076 .UNINDENT
1077 .UNINDENT
1078 .sp
1079 Scope: Global / Server / Model.
1080 .sp
1081 \fBaws_snapshot_lock_expiration_date\fP
1082 .sp
1083 The lock duration is determined by an expiration date in the future. It must be at least
1084 1 day after the snapshot creation date and time, using the format
1085 \fBYYYY\-MM\-DDTHH:MM:SS.sssZ\fP\&. Set either the lock duration or the expiration date (not
1086 both).
1087 .sp
1088 \fBNote:\fP
1089 .INDENT 0.0
1090 .INDENT 3.5
1091 Only supported when \fBbackup_method = snapshot\fP and \fBsnapshot_provider = aws\fP\&.
1092 .UNINDENT
1093 .UNINDENT
1094 .sp
1095 Scope: Global / Server / Model.
1096 .sp
1097 \fBazure_credential\fP
1098 .sp
1099 Specifies the type of Azure credential to use for authentication, either \fBazure\-cli\fP,
1100 \fBmanaged\-identity\fP or \fBdefault\fP\&. If not provided, the default Azure authentication
1101 method will be used.
1102 .sp
1103 \fBNote:\fP
1104 .INDENT 0.0
1105 .INDENT 3.5
1106 Only supported when \fBbackup_method = snapshot\fP and \fBsnapshot_provider = azure\fP\&.
1107 .UNINDENT
1108 .UNINDENT
1109 .sp
1110 Scope: Global / Server / Model.
1111 .sp
1112 \fBazure_resource_group\fP
1113 .sp
1114 Specifies the name of the Azure resource group containing the compute instance and
1115 disks defined by \fBsnapshot_instance\fP and \fBsnapshot_disks\fP\&.
1116 .sp
1117 \fBNote:\fP
1118 .INDENT 0.0
1119 .INDENT 3.5
1120 Only supported when \fBbackup_method = snapshot\fP and \fBsnapshot_provider = azure\fP\&.
1121 .UNINDENT
1122 .UNINDENT
1123 .sp
1124 Scope: Global / Server / Model.
1125 .sp
1126 \fBazure_subscription_id\fP
1127 .sp
1128 Identifies the Azure subscription that owns the instance and storage volumes defined by
1129 \fBsnapshot_instance\fP and \fBsnapshot_disks\fP\&.
1130 .sp
1131 \fBNote:\fP
1132 .INDENT 0.0
1133 .INDENT 3.5
1134 Only supported when \fBbackup_method = snapshot\fP and \fBsnapshot_provider = azure\fP\&.
1135 .UNINDENT
1136 .UNINDENT
1137 .sp
1138 Scope: Global / Server / Model.
1139 .sp
1140 \fBcloud_delete_batch_size\fP
1141 .sp
1142 Specifies the number of files to delete in a single batch when performing delete
1143 operations on cloud storage. This option is relevant for both backup and WAL file
1144 deletions. The default value is \fB1000\fP for S3, \fB256\fP for Azure Blob, and \fB100\fP for
1145 GCS.
1146 .sp
1147 \fBNote:\fP
1148 .INDENT 0.0
1149 .INDENT 3.5
1150 Only supported when \fBbackup_method\fP is \fBpostgres\fP or \fBlocal\-to\-cloud\fP, and
1151 \fBbasebackups_directory\fP and/or \fBwals_directory\fP point to cloud storage.
1152 .UNINDENT
1153 .UNINDENT
1154 .sp
1155 Scope: Global / Server / Model.
1156 .sp
1157 \fBcloud_upload_max_archive_size\fP
1158 .sp
1159 Specifies the maximum size in bytes for individual archive files during cloud uploads.
1160 When uploading backups to cloud storage, Barman splits the backup into multiple archive
1161 files if it exceeds this size. The default value is \fB100Gi\fP\&.
1162 .sp
1163 The accepted format is \fBn{k|Ki|M|Mi|G|Gi|T|Ti}\fP and case\-sensitive, where \fBn\fP
1164 is an integer greater than zero, with an optional SI or IEC suffix. k stands for
1165 kilo with k = 1000, while Ki stands for kilobytes Ki = 1024. The rest of the options
1166 have the same reasoning for greater units of measure.
1167 .sp
1168 \fBNote:\fP
1169 .INDENT 0.0
1170 .INDENT 3.5
1171 Only supported when \fBbackup_method\fP is \fBpostgres\fP or \fBlocal\-to\-cloud\fP, and
1172 \fBbasebackups_directory\fP points to cloud storage.
1173 .UNINDENT
1174 .UNINDENT
1175 .sp
1176 Scope: Global / Server / Model.
1177 .sp
1178 \fBcloud_upload_min_chunk_size\fP
1179 .sp
1180 Specifies the minimum size in bytes for individual chunks during multipart uploads to
1181 cloud storage. This controls the size of each part when uploading large files to cloud
1182 object storage. When not set, defaults to the chunk size of the cloud provider: \fB5Mi\fP
1183 for S3, and \fB64Ki\fP for Azure Blob. Not applicable for GCS.
1184 .sp
1185 The accepted format is \fBn{k|Ki|M|Mi|G|Gi|T|Ti}\fP and case\-sensitive, where \fBn\fP
1186 is an integer greater than zero, with an optional SI or IEC suffix. k stands for
1187 kilo with k = 1000, while Ki stands for kilobytes Ki = 1024. The rest of the options
1188 have the same reasoning for greater units of measure.
1189 .sp
1190 \fBNote:\fP
1191 .INDENT 0.0
1192 .INDENT 3.5
1193 Only supported when \fBbackup_method\fP is \fBpostgres\fP or \fBlocal\-to\-cloud\fP, and
1194 \fBbasebackups_directory\fP points to cloud storage.
1195 .UNINDENT
1196 .UNINDENT
1197 .sp
1198 \fBcloud_staging_directory\fP
1199 .sp
1200 A staging directory for when sending backups to a cloud object storage using
1201 \fBbackup_method = postgres\fP\&. It is used as a temporary location for storing chunks of
1202 the backup before they are sent to the cloud. Defaults to \fB/tmp/barman/cloud\-staging\fP\&.
1203 .sp
1204 Scope: Global / Server / Model.
1205 .sp
1206 \fBcloud_staging_max_size\fP
1207 .sp
1208 The maximum size that \fBcloud_staging_directory\fP can grow to before Barman stops
1209 generating new backup chunks. This is used to prevent the staging directory from
1210 growing in case the speed of uploading chunks does not keep up with the speed of
1211 streaming them from Postgres. The default value is \fB30Gi\fP\&.
1212 .sp
1213 Extremely low values are discouraged as they may lead to performance degradation. We
1214 recommend a minimum of at least \fB10Gi\fP\&. The optimal value will depend on the transfer
1215 speed of the backup to Barman and from Barman to the cloud, as well as the size of the
1216 backup.
1217 .sp
1218 The accepted format is \fBn{k|Ki|M|Mi|G|Gi|T|Ti}\fP and case\-sensitive, where \fBn\fP is
1219 an integer greater than zero, with an optional SI or IEC suffix. k stands for kilo with
1220 k = 1000, while Ki stands for kilobytes Ki = 1024. The rest of the options have the same
1221 reasoning for greater units of measure.
1222 .sp
1223 Scope: Global / Server / Model.
1224 .sp
1225 \fBgcp_project\fP
1226 .sp
1227 Specifies the ID of the GCP project that owns the instance and storage volumes defined
1228 by \fBsnapshot_instance\fP and \fBsnapshot_disks\fP\&.
1229 .sp
1230 \fBNote:\fP
1231 .INDENT 0.0
1232 .INDENT 3.5
1233 Only supported when \fBbackup_method = snapshot\fP and \fBsnapshot_provider = gcp\fP\&.
1234 .UNINDENT
1235 .UNINDENT
1236 .sp
1237 Scope: Global / Server / Model.
1238 .sp
1239 \fBgcp_zone\fP
1240 .sp
1241 Indicates the availability zone where the compute instance and disks are located for
1242 snapshot backups.
1243 .sp
1244 \fBNote:\fP
1245 .INDENT 0.0
1246 .INDENT 3.5
1247 Only supported when \fBbackup_method = snapshot\fP and \fBsnapshot_provider = gcp\fP\&.
1248 .UNINDENT
1249 .UNINDENT
1250 .sp
1251 Scope: Server / Model.
1252 .sp
1253 \fBsnapshot_disks\fP
1254 .sp
1255 This option is a comma\-separated list of disks to include in cloud snapshot backups.
1256 .sp
1257 \fBNote:\fP
1258 .INDENT 0.0
1259 .INDENT 3.5
1260 Required when \fBbackup_method = snapshot\fP\&.
1261 .sp
1262 Ensure that the \fBsnapshot_disks\fP list includes all disks that store Postgres data,
1263 as any data not on these listed disks will not be included in the backup and will be
1264 unavailable during recovery.
1265 .UNINDENT
1266 .UNINDENT
1267 .sp
1268 Scope: Server / Model.
1269 .sp
1270 \fBsnapshot_instance\fP
1271 .sp
1272 The name of the VM or compute instance where the storage volumes are attached.
1273 .sp
1274 \fBNote:\fP
1275 .INDENT 0.0
1276 .INDENT 3.5
1277 Required when \fBbackup_method = snapshot\fP\&.
1278 .UNINDENT
1279 .UNINDENT
1280 .sp
1281 Scope: Server / Model.
1282 .sp
1283 \fBsnapshot_provider\fP
1284 .sp
1285 The name of the cloud provider to use for creating snapshots. Supported value:
1286 \fBaws\fP, \fBazure\fP and \fBgcp\fP\&.
1287 .sp
1288 \fBNote:\fP
1289 .INDENT 0.0
1290 .INDENT 3.5
1291 Required when \fBbackup_method = snapshot\fP\&.
1292 .UNINDENT
1293 .UNINDENT
1294 .sp
1295 Scope: Global / Server / Model.
1296 .SS Hook Scripts
1297 .sp
1298 These configuration options are related to the pre or post execution of hook scripts.
1299 .sp
1300 \fBpost_archive_retry_script\fP
1301 .sp
1302 Specifies a hook script to run after a WAL file is archived. Barman will retry this
1303 script until it returns \fBSUCCESS\fP (0), \fBABORT_CONTINUE\fP (62), or \fBABORT_STOP\fP
1304 (63). In a post\-archive scenario, \fBABORT_STOP\fP has the same effect as
1305 \fBABORT_CONTINUE\fP\&.
1306 .sp
1307 Scope: Global / Server.
1308 .sp
1309 \fBpost_archive_script\fP
1310 .sp
1311 Specifies a hook script to run after a WAL file is archived, following the
1312 \fBpost_archive_retry_script\fP\&.
1313 .sp
1314 Scope: Global / Server.
1315 .sp
1316 \fBpost_backup_retry_script\fP
1317 .sp
1318 Specifies a hook script to run after a base backup. Barman will retry this script until
1319 it returns \fBSUCCESS\fP (0), \fBABORT_CONTINUE\fP (62), or \fBABORT_STOP\fP (63). In a
1320 post\-backup scenario, \fBABORT_STOP\fP has the same effect as \fBABORT_CONTINUE\fP\&.
1321 .sp
1322 Scope: Global / Server.
1323 .sp
1324 \fBpost_backup_script\fP
1325 .sp
1326 Specifies a hook script to run after a base backup, following the
1327 \fBpost_backup_retry_script\fP\&.
1328 .sp
1329 Scope: Global / Server.
1330 .sp
1331 \fBpost_delete_retry_script\fP
1332 .sp
1333 Specifies a hook script to run after deleting a backup. Barman will retry this script
1334 until it returns \fBSUCCESS\fP (0), \fBABORT_CONTINUE\fP (62), or \fBABORT_STOP\fP (63). In
1335 a post\-delete scenario, \fBABORT_STOP\fP has the same effect as \fBABORT_CONTINUE\fP\&.
1336 .sp
1337 Scope: Global / Server.
1338 .sp
1339 \fBpost_delete_script\fP
1340 .sp
1341 Specifies a hook script to run after deleting a backup, following the
1342 \fBpost_delete_retry_script\fP\&.
1343 .sp
1344 Scope: Global / Server.
1345 .sp
1346 \fBpost_recovery_retry_script\fP
1347 .sp
1348 Specifies a hook script to run after a recovery. Barman will retry this script until it
1349 returns \fBSUCCESS\fP (0), \fBABORT_CONTINUE\fP (62), or \fBABORT_STOP\fP (63). In a
1350 post\-recovery scenario, \fBABORT_STOP\fP has the same effect as \fBABORT_CONTINUE\fP\&.
1351 .sp
1352 Scope: Global / Server.
1353 .sp
1354 \fBpost_recovery_script\fP
1355 .sp
1356 Specifies a hook script to run after a recovery, following the
1357 \fBpost_recovery_retry_script\fP\&.
1358 .sp
1359 Scope: Global / Server.
1360 .sp
1361 \fBpost_wal_delete_retry_script\fP
1362 .sp
1363 Specifies a hook script to run after deleting a WAL file. Barman will retry this script
1364 until it returns \fBSUCCESS\fP (0), \fBABORT_CONTINUE\fP (62), or \fBABORT_STOP\fP (63). In
1365 a post\-WAL\-delete scenario, \fBABORT_STOP\fP has the same effect as \fBABORT_CONTINUE\fP\&.
1366 .sp
1367 Scope: Global / Server.
1368 .sp
1369 \fBpost_wal_delete_script\fP
1370 .sp
1371 Specifies a hook script to run after deleting a WAL file, following the
1372 \fBpost_wal_delete_retry_script\fP\&.
1373 .sp
1374 Scope: Global / Server.
1375 .sp
1376 \fBpre_archive_retry_script\fP
1377 .sp
1378 Specifies a hook script that runs before a WAL file is archived during maintenance,
1379 following the \fBpre_archive_script\fP\&. As a retry hook script, Barman will repeatedly
1380 execute the script until it returns either \fBSUCCESS\fP (0), \fBABORT_CONTINUE\fP (62),
1381 or \fBABORT_STOP\fP (63). Returning \fBABORT_STOP\fP will escalate the failure and halt
1382 the WAL archiving process.
1383 .sp
1384 Scope: Global / Server.
1385 .sp
1386 \fBpre_archive_script\fP
1387 .sp
1388 Specifies a hook script launched before a WAL file is archived by maintenance.
1389 .sp
1390 Scope: Global / Server.
1391 .sp
1392 \fBpre_backup_retry_script\fP
1393 .sp
1394 Specifies a hook script that runs before a base backup, following the
1395 \fBpre_backup_script\fP\&. As a retry hook script, Barman will attempt to execute the
1396 script repeatedly until it returns \fBSUCCESS\fP (0), \fBABORT_CONTINUE\fP (62), or
1397 \fBABORT_STOP\fP (63). Returning \fBABORT_STOP\fP will escalate the failure and interrupt
1398 the backup process.
1399 .sp
1400 Scope: Global / Server.
1401 .sp
1402 \fBpre_backup_script\fP
1403 .sp
1404 Specifies a hook script to run before starting a base backup.
1405 .sp
1406 Scope: Global / Server.
1407 .sp
1408 \fBpre_delete_retry_script\fP
1409 .sp
1410 Specifies a retry hook script to run before backup deletion, following the
1411 \fBpre_delete_script\fP\&. As a retry hook script, Barman will attempt to execute the
1412 script repeatedly until it returns \fBSUCCESS\fP (0), \fBABORT_CONTINUE\fP (62), or
1413 \fBABORT_STOP\fP (63). Returning \fBABORT_STOP\fP will escalate the failure and interrupt
1414 the backup deletion.
1415 .sp
1416 Scope: Global / Server.
1417 .sp
1418 \fBpre_delete_script\fP
1419 .sp
1420 Specifies a hook script run before deleting a backup.
1421 .sp
1422 Scope: Global / Server.
1423 .sp
1424 \fBpre_recovery_retry_script\fP
1425 .sp
1426 Specifies a retry hook script to run before recovery, following the
1427 \fBpre_recovery_script\fP\&. As a retry hook script, Barman will attempt to execute the
1428 script repeatedly until it returns \fBSUCCESS\fP (0), \fBABORT_CONTINUE\fP (62), or
1429 \fBABORT_STOP\fP (63). Returning \fBABORT_STOP\fP will escalate the failure and interrupt
1430 the recover process.
1431 .sp
1432 Scope: Global / Server.
1433 .sp
1434 \fBpre_recovery_script\fP
1435 .sp
1436 Specifies a hook script run before starting a recovery.
1437 .sp
1438 Scope: Global / Server.
1439 .sp
1440 \fBpre_wal_delete_retry_script\fP
1441 .sp
1442 Specifies a retry hook script for WAL file deletion, executed before
1443 \fBpre_wal_delete_script\fP\&. As a retry hook script, Barman will attempt to execute the
1444 script repeatedly until it returns \fBSUCCESS\fP (0), \fBABORT_CONTINUE\fP (62), or
1445 \fBABORT_STOP\fP (63). Returning \fBABORT_STOP\fP will escalate the failure and interrupt
1446 the WAL file deletion.
1447 .sp
1448 Scope: Global / Server.
1449 .sp
1450 \fBpre_wal_delete_script\fP
1451 .sp
1452 Specifies a hook script run before deleting a WAL file.
1453 .sp
1454 Scope: Global / Server.
1455 .SS Write\-Ahead Logs (WAL)
1456 .sp
1457 These configuration options are related to how Barman will manage the Write\-Ahead Logs
1458 (WALs) of the PostreSQL servers.
1459 .sp
1460 \fBcompression\fP
1461 .sp
1462 Specifies the standard compression algorithm for WAL files. Options include: \fBlz4\fP,
1463 \fBxz\fP, \fBzstd\fP, \fBgzip\fP, \fBpygzip\fP, \fBpigz\fP, \fBbzip2\fP, \fBpybzip2\fP, \fBsnappy\fP
1464 and \fBcustom\fP\&.
1465 .sp
1466 Deprecated since version 3.16: The \fBpygzip\fP and \fBpybzip2\fP compression options are deprecated and will be
1467 removed in a future release. Use their equivalents \fBgzip\fP and \fBbzip2\fP instead.
1468
1469 .sp
1470 Deprecated since version 3.17: The \fBcustom\fP compression option and related configuration options
1471 (\fBcustom_compression_filter\fP, \fBcustom_decompression_filter\fP, and
1472 \fBcustom_compression_magic\fP) are deprecated and will be removed in a future
1473 release. Use one of the built\-in compression algorithms instead.
1474
1475 .sp
1476 \fBNote:\fP
1477 .INDENT 0.0
1478 .INDENT 3.5
1479 All of these options require the module to be installed in the location where the
1480 compression will occur.
1481 .sp
1482 The \fBcustom\fP option is for custom compression, which requires you to set the
1483 following options as well:
1484 .INDENT 0.0
1485 .IP \(bu 2
1486 \fBcustom_compression_filter\fP: a compression filter.
1487 .IP \(bu 2
1488 \fBcustom_decompression_filter\fP: a decompression filter
1489 .IP \(bu 2
1490 \fBcustom_compression_magic\fP: a hex string to identify a custom compressed wal
1491 file.
1492 .UNINDENT
1493 .UNINDENT
1494 .UNINDENT
1495 .sp
1496 Scope: Global / Server / Model.
1497 .sp
1498 Deprecated since version 3.17: This configuration option is deprecated and will be removed in a future release.
1499
1500 .sp
1501 \fBcustom_compression_filter\fP
1502 .sp
1503 Specifies a custom compression algorithm for WAL files. It must be a \fBstring\fP that
1504 will be used internally to create a bash command and it will prefix to the
1505 following string \fB> \(dq$2\(dq < \(dq$1\(dq;\fP\&. Write to standard output and do not delete input
1506 files.
1507 .sp
1508 \fBTip:\fP
1509 .INDENT 0.0
1510 .INDENT 3.5
1511 \fBcustom_compression_filter = \(dqxz \-c\(dq\fP
1512 .sp
1513 This is the same as running \fBxz \-c > \(dq$2\(dq < \(dq$1\(dq;\fP\&.
1514 .UNINDENT
1515 .UNINDENT
1516 .sp
1517 Scope: Global / Server / Model.
1518 .sp
1519 Deprecated since version 3.17: This configuration option is deprecated and will be removed in a future release.
1520
1521 .sp
1522 \fBcustom_compression_magic\fP
1523 .sp
1524 Defines a custom magic value to identify the custom compression algorithm used in WAL
1525 files. If this is set, Barman will avoid applying custom compression to WALs that have
1526 already been compressed with the specified algorithm. If not configured, Barman will
1527 apply custom compression to all WAL files, even those pre\-compressed.
1528 .sp
1529 \fBTip:\fP
1530 .INDENT 0.0
1531 .INDENT 3.5
1532 For example, in the \fBxz\fP compression algorithm, the magic number is used to detect
1533 the format of \fB\&.xz\fP files.
1534 .INDENT 0.0
1535 .TP
1536 .B For xz files, the magic number is the following sequence of bytes:
1537 Magic Number: \fBFD 37 7A 58 5A 00\fP
1538 .TP
1539 .B In hexadecimal representation, this can be expressed as:
1540 Hex String: \fBfd377a585a00\fP
1541 .UNINDENT
1542 .sp
1543 As Barman expects the value of \fBcustom_compression_magic\fP to be prefixed with
1544 \fB0x\fP, you would need to set that config option like this:
1545 .INDENT 0.0
1546 .INDENT 3.5
1547 .sp
1548 .EX
1549 custom_compression_magic = 0xfd377a585a00
1550 .EE
1551 .UNINDENT
1552 .UNINDENT
1553 .sp
1554 Reference: xz\-file\-format \%<https://\:tukaani\:.org/\:xz/\:xz-file-format-1\:.0\:.4\:.txt>
1555 .UNINDENT
1556 .UNINDENT
1557 .sp
1558 Scope: Global / Server / Model.
1559 .sp
1560 Deprecated since version 3.17: This configuration option is deprecated and will be removed in a future release.
1561
1562 .sp
1563 \fBcustom_decompression_filter\fP
1564 .sp
1565 Specifies a custom decompression algorithm for compressed WAL files. It must be a
1566 \fBstring\fP that will be used internally to create a bash command and it will
1567 prefix to the following string \fB> \(dq$2\(dq < \(dq$1\(dq;\fP\&. It must correspond with the
1568 compression algorithm used.
1569 .sp
1570 \fBTip:\fP
1571 .INDENT 0.0
1572 .INDENT 3.5
1573 \fBcustom_compression_filter = \(dqxz \-c \-d\(dq\fP
1574 .sp
1575 This is the same as running \fBxz \-c \-d > \(dq$2\(dq < \(dq$1\(dq;\fP\&.
1576 .UNINDENT
1577 .UNINDENT
1578 .sp
1579 Scope: Global / Server / Model.
1580 .sp
1581 \fBcompression_level\fP
1582 .sp
1583 Specifies the compression level to be used by the selected compression algorithm. Valid
1584 values are integers within the supported range of the chosen algorithm or one
1585 of the predefined labels: \fBlow\fP, \fBmedium\fP, and \fBhigh\fP, which serve as shortcuts.
1586 .INDENT 0.0
1587 .IP \(bu 2
1588 \fBlow\fP: uses low level of compression, favoring compression speed over compression ratio.
1589 .IP \(bu 2
1590 \fBmedium\fP: uses a medium level of compression, balancing between compression speed and compression ratio.
1591 .IP \(bu 2
1592 \fBhigh\fP: uses a high level of compression, favoring compression ratio over compression speed.
1593 .UNINDENT
1594 .sp
1595 Predefined labels map to algorithm\-specific levels, as detailed below:
1596 .SS Compression levels
1597 .TS
1598 box center;
1599 l|l|l|l|l.
1600 T{
1601 Algorithm
1602 T} T{
1603 Level range
1604 T} T{
1605 low
1606 T} T{
1607 medium
1608 T} T{
1609 high
1610 T}
1611 _
1612 T{
1613 \fBlz4\fP
1614 T} T{
1615 0 to 16
1616 T} T{
1617 0
1618 T} T{
1619 6
1620 T} T{
1621 10
1622 T}
1623 _
1624 T{
1625 \fBxz\fP
1626 T} T{
1627 1 to 9
1628 T} T{
1629 1
1630 T} T{
1631 3
1632 T} T{
1633 5
1634 T}
1635 _
1636 T{
1637 \fBzstd\fP
1638 T} T{
1639 \-22 to 22
1640 T} T{
1641 1
1642 T} T{
1643 4
1644 T} T{
1645 9
1646 T}
1647 _
1648 T{
1649 \fBgzip\fP, \fBpygzip\fP and \fBpigz\fP
1650 T} T{
1651 1 to 9
1652 T} T{
1653 1
1654 T} T{
1655 6
1656 T} T{
1657 9
1658 T}
1659 _
1660 T{
1661 \fBbzip2\fP and \fBpybzip2\fP
1662 T} T{
1663 1 to 9
1664 T} T{
1665 1
1666 T} T{
1667 5
1668 T} T{
1669 9
1670 T}
1671 .TE
1672 .sp
1673 If the specified compression level is greater than the algorithm\(aqs maximum level, that
1674 maximum level is used. Similarly, if it is lower than the minimum level, that minimum
1675 level is used. The default value is \fBmedium\fP\&.
1676 .sp
1677 Scope: Global / Server / Model.
1678 .sp
1679 \fBcloud_wal_archive_parallel\fP
1680 .sp
1681 Controls the number of WAL files that \fBbarman cloud\-wal\-archive\fP will upload in
1682 parallel. When set to \fBN\fP (where N > 1), up to \fBN \- 1\fP additional WAL files that
1683 are ready in \fBpg_wal/archive_status\fP are uploaded concurrently in background
1684 processes after the primary WAL has been successfully archived. Defaults to \fB0\fP
1685 (disabled).
1686 .sp
1687 \fBNote:\fP
1688 .INDENT 0.0
1689 .INDENT 3.5
1690 This option only applies when using the \fBlocal\-to\-cloud\fP backup method with
1691 \fBbarman cloud\-wal\-archive\fP as the \fBarchive_command\fP\&.
1692 .UNINDENT
1693 .UNINDENT
1694 .sp
1695 Scope: Global / Server.
1696 .sp
1697 \fBincoming_wals_directory\fP
1698 .sp
1699 Specifies the directory where incoming WAL files are archived. Requires \fBarchiver\fP to
1700 be enabled. Defaults to \fB<backup_directory>/incoming\fP\&.
1701 .sp
1702 Scope: Server.
1703 .sp
1704 \fBlast_wal_maximum_age\fP
1705 .sp
1706 Defines the time frame within which the latest archived WAL file must fall. If the
1707 latest WAL file is older than this period, the barman check command will report an
1708 error. If left empty (default), the age of the WAL files is not checked. Format is the
1709 same as \fBlast_backup_maximum_age\fP\&.
1710 .sp
1711 Scope: Global / Server / Model.
1712 .sp
1713 \fBmax_incoming_wals_queue\fP
1714 .sp
1715 Defines the maximum number of WAL files allowed in the incoming queue (including both
1716 streaming and archiving pools) before the barman check command returns an error.
1717 Default is \fBNone\fP (disabled).
1718 .sp
1719 Scope: Global / Server / Model.
1720 .sp
1721 \fBstreaming_wals_directory\fP
1722 .sp
1723 Directory for streaming WAL files. Defaults to \fB<backup_directory>/streaming\fP\&.
1724 .sp
1725 \fBNote:\fP
1726 .INDENT 0.0
1727 .INDENT 3.5
1728 This option is applicable when \fBstreaming_archiver\fP is activated.
1729 .UNINDENT
1730 .UNINDENT
1731 .sp
1732 Scope: Server.
1733 .sp
1734 \fBwal_conninfo\fP
1735 .sp
1736 The \fBwal_conninfo\fP connection string is used by Barman for monitoring the status of
1737 the replication slot receiving WALs. If specified, it takes precedence over
1738 \fBwal_streaming_conninfo\fP for these checks. If \fBwal_conninfo\fP is not set but
1739 \fBwal_streaming_conninfo\fP is, \fBwal_conninfo\fP will fall back to
1740 \fBwal_streaming_conninfo\fP\&. If neither \fBwal_conninfo\fP nor \fBwal_streaming_conninfo\fP
1741 is set, \fBwal_conninfo\fP will fall back to \fBconninfo\fP\&. Both connection strings must
1742 access a Postgres instance within the same cluster as defined by \fBstreaming_conninfo\fP
1743 and \fBconninfo\fP\&. If both \fBwal_conninfo\fP and \fBwal_streaming_conninfo\fP are set, only
1744 \fBwal_conninfo\fP needs the appropriate permissions to read settings and check the
1745 replication slot status. However, if only \fBwal_streaming_conninfo\fP is set, it must
1746 have the necessary permissions to perform these tasks. The required permissions include
1747 roles such as \fBpg_monitor\fP, both \fBpg_read_all_settings\fP and \fBpg_read_all_stats\fP,
1748 or superuser privileges.
1749 .sp
1750 Scope: Server / Model.
1751 .sp
1752 \fBwal_streaming_conninfo\fP
1753 .sp
1754 This connection string is used by Barman to connect to the Postgres server for receiving
1755 WAL segments via streaming replication and checking the replication slot status, if
1756 \fBwal_conninfo\fP is not set. If not specified, Barman defaults to using
1757 \fBstreaming_conninfo\fP for these tasks. \fBwal_streaming_conninfo\fP must connect to a
1758 Postgres instance within the same cluster as defined by \fBstreaming_conninfo\fP, and it
1759 must support streaming replication. If both \fBwal_streaming_conninfo\fP and
1760 \fBwal_conninfo\fP are set, only \fBwal_conninfo\fP needs the required permissions to read
1761 settings and check the replication slot status. If only \fBwal_streaming_conninfo\fP is
1762 specified, it must have these permissions. The necessary permissions include roles such
1763 as \fBpg_monitor\fP, both \fBpg_read_all_settings\fP and \fBpg_read_all_stats\fP, or superuser
1764 privileges.
1765 .sp
1766 Scope: Server / Model.
1767 .sp
1768 \fBwals_directory\fP
1769 .sp
1770 Destination for archived WAL files. It can be a local path if storing WAL files locally,
1771 or a cloud storage URL if storing WAL files in the cloud as described in
1772 Streaming backups to the cloud \%<#\:backup-streaming-backup-cloud>\&. Defaults to \fB<backup_directory>/wals\fP\&.
1773 .sp
1774 \fBWarning:\fP
1775 .INDENT 0.0
1776 .INDENT 3.5
1777 Changing the value of \fBwals_directory\fP on an active server is discouraged. Even if
1778 done with care, by deactivating the server, moving existing data to the new location,
1779 and reactivating it, there are potential risks of data loss or misconfiguration.
1780 .sp
1781 Instead, the safe option is to create a new server configuration with the new value
1782 for \fBwals_directory\fP, perform a new full backup to the new server, and then
1783 decommission the old server once the new one is fully operational.
1784 .UNINDENT
1785 .UNINDENT
1786 .sp
1787 Scope: Server.
1788 .sp
1789 \fBxlogdb_directory\fP
1790 .sp
1791 A custom directory for the \fBSERVER\-xlog.db\fP file, \fBSERVER\fP being the server name.
1792 This file stores metadata of archived WAL files and is used internally by Barman. If
1793 unset, it defaults to the value of \fBwals_directory\fP\&.
1794 .sp
1795 Scope: Global / Server.
1796 .SS Restore
1797 .sp
1798 These configuration options are related to how Barman manages restoration backups.
1799 .sp
1800 \fBlocal_staging_path\fP
1801 .sp
1802 Specifies the local path for combining block\-level incremental backups during recovery.
1803 This location must have sufficient space to temporarily store the new synthetic backup.
1804 Required for recovery from a block\-level incremental backup.
1805 .sp
1806 \fBNote:\fP
1807 .INDENT 0.0
1808 .INDENT 3.5
1809 Applies only when \fBbackup_method = postgres\fP\&.
1810 .UNINDENT
1811 .UNINDENT
1812 .sp
1813 Deprecated since version 3.15: \fBlocal_staging_path\fP is deprecated and will be removed in a future release.
1814 Use \fBstaging_path\fP and \fBstaging_location\fP instead.
1815
1816 .sp
1817 Scope: Global / Server / Model.
1818 .sp
1819 \fBrecovery_options\fP
1820 .sp
1821 Options for recovery operations. Currently, only \fBget\-wal\fP and \fBdelta\-restore\fP are
1822 supported. \fBget\-wal\fP enables the creation of a basic \fBrestore_command\fP in the
1823 recovery configuration, which uses the barman \fBget\-wal\fP command to retrieve WAL files
1824 directly from Barman\(aqs WAL archive. \fBdelta\-restore\fP allows barman to restore a backup
1825 into a pre\-existing destination directory along with existing custom tablespaces by
1826 overwriting it. This setting accepts a comma\-separated list of values and defaults to
1827 empty.
1828 .sp
1829 Scope: Global / Server / Model.
1830 .sp
1831 \fBrecovery_staging_path\fP
1832 .sp
1833 Specifies the path on the recovery host for staging files from compressed backups. This
1834 location must have sufficient space to temporarily store the compressed backup.
1835 .sp
1836 \fBNote:\fP
1837 .INDENT 0.0
1838 .INDENT 3.5
1839 Applies only for compressed backups.
1840 .UNINDENT
1841 .UNINDENT
1842 .sp
1843 Deprecated since version 3.15: \fBrecovery_staging_path\fP is deprecated and will be removed in a future release.
1844 Use \fBstaging_path\fP and \fBstaging_location\fP instead.
1845
1846 .sp
1847 Scope: Global / Server / Model.
1848 .sp
1849 \fBstaging_path\fP
1850 .sp
1851 A path where intermediate files are staged during restore. When restoring a compressed
1852 backup, it serves as a temporary location for decompression before copying to the final
1853 destination. When restoring an incremental backup, it is where backups are combined
1854 before copying to the final destination. This location must have enough space to store
1855 the decompressed/combined backup. The default is \fB/tmp\fP\&.
1856 .sp
1857 Scope: Global / Server / Model.
1858 .sp
1859 \fBstaging_location\fP
1860 .sp
1861 Specifies whether \fBstaging_path\fP is a local or remote path. Valid values are
1862 \fBlocal\fP and \fBremote\fP\&. The default is \fBlocal\fP\&.
1863 .sp
1864 Scope: Global / Server / Model.
1865 .sp
1866 \fBcombine_mode\fP
1867 .sp
1868 Specifies a copy mode for \fBpg_combinebackup\fP when combining incremental backups
1869 during a restore.
1870 .sp
1871 Options include:
1872 .INDENT 0.0
1873 .IP \(bu 2
1874 \fBcopy\fP (default): Use standard file copying when combining incremental backups.
1875 .IP \(bu 2
1876 \fBlink\fP: Use hard links when combining incremental backups. Reconstruction of the
1877 synthetic backup might be faster (no file copying) and use less disk space.
1878 .IP \(bu 2
1879 \fBclone\fP: Use efficient file cloning (also known as “reflinks” on some systems)
1880 instead of copying files to the new data directory, which can result in
1881 near\-instantaneous copying of the data files.
1882 .IP \(bu 2
1883 \fBcopy\-file\-range\fP: Use the \fBcopy_file_range\fP system call for efficient copying.
1884 On some file systems this gives results similar to \fBclone\fP, sharing physical disk
1885 blocks, while on others it may still copy blocks, but do so via an optimized path.
1886 .UNINDENT
1887 .sp
1888 Refer to the pg_combinebackup documentation \%<https://\:www\:.postgresql\:.org/\:docs/\:current/\:app-pgcombinebackup\:.html>
1889 for more details and restrictions of each mode.
1890 .sp
1891 Scope: Global / Server / Model.
1892 .SS Retention Policies
1893 .sp
1894 These configuration options are related to how Barman manages retention policies of the
1895 backups.
1896 .sp
1897 \fBlast_backup_maximum_age\fP
1898 .sp
1899 Defines the time frame within which the latest backup must fall. If the latest backup
1900 is older than this period, the barman check command will report an error. If left
1901 empty (default), the latest backup is always considered valid. The accepted format is
1902 \fB\(dqn {DAYS|WEEKS|MONTHS|HOURS}\(dq\fP, where \fBn\fP is an integer greater than zero.
1903 .sp
1904 Scope: Global / Server / Model.
1905 .sp
1906 \fBlast_backup_minimum_size\fP
1907 .sp
1908 Specifies the minimum acceptable size for the latest successful backup. If the latest
1909 backup is smaller than this size, the barman check command will report an error. If
1910 left empty (default), the latest backup is always considered valid. The accepted
1911 format is \fB\(dqn{k|Ki|M|Mi|G|Gi|T|Ti}\(dq\fP and case\-sensitive, where \fBn\fP is an integer
1912 greater than zero, with an optional SI or IEC suffix. k stands for kilo with k = 1000,
1913 while Ki stands for kilobytes Ki = 1024. The rest of the options have the same
1914 reasoning for greater units of measure.
1915 .sp
1916 Scope: Global / Server / Model.
1917 .sp
1918 \fBretention_policy\fP
1919 .sp
1920 Defines how long backups and WAL files should be retained. If this option is left blank,
1921 no retention policies will be applied. Options include redundancy and recovery window
1922 policies.
1923 .INDENT 0.0
1924 .INDENT 3.5
1925 .sp
1926 .EX
1927 retention_policy = {REDUNDANCY value | RECOVERY WINDOW OF value {DAYS | WEEKS | MONTHS}}
1928 .EE
1929 .UNINDENT
1930 .UNINDENT
1931 .INDENT 0.0
1932 .IP \(bu 2
1933 \fBretention_policy = REDUNDANCY 2\fP will keep only 2 backups in the backup catalog
1934 automatically deleting the older one as new backups are created. The number must be
1935 a positive integer.
1936 .IP \(bu 2
1937 \fBretention_policy = RECOVERY WINDOW OF 2 DAYS\fP will only keep backups needed to
1938 recover to any point in time in the last two days, automatically deleting backups
1939 that are older. The period number must be a positive integer, and the following
1940 options can be applied to it: \fBDAYS\fP, \fBWEEKS\fP, \fBMONTHS\fP\&.
1941 .UNINDENT
1942 .sp
1943 Scope: Global / Server / Model.
1944 .sp
1945 \fBretention_policy_mode\fP
1946 .sp
1947 Mode for enforcing retention policies. Currently only supports \fBauto\fP\&.
1948 .sp
1949 Scope: Global / Server / Model.
1950 .sp
1951 \fBwal_retention_policy\fP
1952 .sp
1953 Policy for retaining WAL files. Currently only \fBmain\fP is available.
1954 .sp
1955 Scope: Global / Server / Model.
1956 .SH CONFIGURATION MODELS
1957 .sp
1958 Configuration models provide a systematic approach to manage and apply configuration
1959 overrides for Postgres servers by organizing them under a specific \fBcluster\fP name.
1960 .SS Purpose
1961 .sp
1962 The primary goal of a configuration model is to simplify the management of configuration
1963 settings for Postgres servers grouped by the same \fBcluster\fP\&. By using a model, you can
1964 apply a set of common configuration overrides, enhancing operational efficiency. They are
1965 especially beneficial in clustered environments, allowing you to create various
1966 configuration models that can be utilized during failover events.
1967 .SS Application
1968 .sp
1969 The configurations defined in a model file can be applied to Postgres servers that share
1970 the same \fBcluster\fP name specified in the model. Consequently, any server utilizing that
1971 model can inherit these settings, promoting a consistent and adaptable configuration
1972 across all servers.
1973 .SS Usage
1974 .sp
1975 Model options can only be defined within a model section, which is identified in the same
1976 way as a server section. It is important to ensure that there are no conflicts between
1977 the identifiers of server sections and model sections.
1978 .sp
1979 To apply a configuration model, execute the
1980 \fBbarman config\-switch SERVER_NAME MODEL_NAME\fP\&. This command facilitates the application
1981 of the model\(aqs overrides to the relevant Postgres server associated with the specified
1982 cluster name.
1983 .sp
1984 If you wish to remove the overrides, the deletion of the model configuration file alone
1985 will not have any effect, so you can do so by using the \fB\-\-reset\fP argument with the
1986 command, as follows: \fBbarman config\-switch SERVER_NAME \-\-reset\fP\&.
1987 .sp
1988 \fBNote:\fP
1989 .INDENT 0.0
1990 .INDENT 3.5
1991 The \fBconfig\-switch\fP command will only succeed if model name exists and is associated
1992 with the same \fBcluster\fP as the server. Additionally, there can be only one active
1993 model at a time; if you execute the command multiple times with different models, only
1994 the overrides defined in the last model will be applied.
1995 .sp
1996 Not all options can be configured through models. Please review the scope of the
1997 available configurations to determine which settings apply to models.
1998 .UNINDENT
1999 .UNINDENT
2000 .SS Benefits
2001 .INDENT 0.0
2002 .IP \(bu 2
2003 Consistency: Ensures uniform configuration across multiple Postgres servers within a
2004 cluster.
2005 .IP \(bu 2
2006 Efficiency: Simplifies configuration management by allowing centralized updates and
2007 overrides.
2008 .IP \(bu 2
2009 Flexibility: Allows the use of multiple model files, providing the ability to define
2010 various sets of overrides as necessary.
2011 .UNINDENT
2012 .SH Author
2013 EnterpriseDB
2014 .SH Copyright
2015 © Copyright EnterpriseDB UK Limited 2011-2026
2016 .\" End of generated man page.