Debian Codegraph @

docs/_build/man/barman.1

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" "1" "Sep 29, 2026" "3.20" "Barman"
33 .SH NAME
34 barman \- Barman Commands
35 .sp
36 Barman has a command\-line interface named \fBbarman\fP, which is used basically to
37 interact with Barman\(aqs backend.
38 .sp
39 Before jumping into each of the sub\-commands of \fBbarman\fP, be aware that \fBbarman\fP
40 has global options available for all of the sub\-commands. These options can modify the
41 behavior of the sub\-commands and can be used as follows:
42 .SH BARMAN
43 .SS Synopsis
44 .INDENT 0.0
45 .INDENT 3.5
46 .sp
47 .EX
48 barman
49 [ { \-c | \-\-config } CONFIG ]
50 [ { \-\-color | \-\-colour } { never | always | auto } ]
51 [ { \-d | \-\-debug } ]
52 [ { \-f | \-\-format } { json | console } ]
53 [ { \-h | \-\-help } ]
54 [ \-\-log\-level { NOTSET | DEBUG | INFO | WARNING | ERROR | CRITICAL } ]
55 [ { \-q | \-\-quiet } ]
56 [ { \-v | \-\-version } ]
57 [ SUBCOMMAND ]
58 .EE
59 .UNINDENT
60 .UNINDENT
61 .sp
62 \fBNote:\fP
63 .INDENT 0.0
64 .INDENT 3.5
65 This is the syntax for the synopsis:
66 .INDENT 0.0
67 .IP \(bu 2
68 Options between square brackets are optional.
69 .IP \(bu 2
70 Options between curly brackets represent a choose one of set operation.
71 .IP \(bu 2
72 Options with \fB[ ... ]\fP can be specified multiple times.
73 .IP \(bu 2
74 Things written in uppercase represent a literal that should be given a value to.
75 .UNINDENT
76 .sp
77 We will use this same syntax when describing \fBbarman\fP sub\-commands in the
78 following sections.
79 .sp
80 Also, when describing sub\-commands in the following sections, the commands\(aq
81 synopsis should be seen as a replacement for the \fBSUBCOMMAND\fP\&.
82 .UNINDENT
83 .UNINDENT
84 .SS Parameters
85 .INDENT 0.0
86 .TP
87 .B \fB\-c\fP / \fB\-\-config CONFIG\fP
88 Specify the configuration file to be used. Defaults to \fB/etc/barman.conf\fP if
89 not provided.
90 .TP
91 .B \fB\-\-color\fP / \fB\-\-colour { never | always | auto }\fP
92 Control whether to use colors in the output. The default is \fBauto\fP\&. Options are:
93 .INDENT 7.0
94 .IP \(bu 2
95 \fBnever\fP: Do not use color.
96 .IP \(bu 2
97 \fBalways\fP: Always use color.
98 .IP \(bu 2
99 \fBauto\fP: Use color if the output is to a terminal.
100 .UNINDENT
101 .TP
102 .B \fB\-d\fP / \fB\-\-debug\fP
103 Enable debug output. Default is \fBfalse\fP\&. Provides detailed logging information for
104 troubleshooting.
105 .TP
106 .B \fB\-f\fP / \fB\-\-format { json | console }\fP
107 Specify the output format. Options are:
108 .INDENT 7.0
109 .IP \(bu 2
110 \fBjson\fP: Output in JSON format.
111 .IP \(bu 2
112 \fBconsole\fP: Output in human\-readable format (default).
113 .UNINDENT
114 .TP
115 .B \fB\-h\fP / \fB\-\-help\fP
116 Show a help message and exit. Provides information about command usage.
117 .TP
118 .B \fB\-\-log\-level { NOTSET | DEBUG | INFO | WARNING | ERROR | CRITICAL }\fP
119 Override the default logging level. Options are:
120 .INDENT 7.0
121 .IP \(bu 2
122 \fBNOTSET\fP: This is the default level when no specific logging level is set. It
123 essentially means \(dqno filtering\(dq of log messages, allowing all messages to be
124 processed according to the levels that are set in the configuration.
125 .IP \(bu 2
126 \fBDEBUG\fP: This level is used for detailed, diagnostic information, often
127 useful for developers when diagnosing problems. It includes messages that are
128 more granular and detailed, intended to help trace the execution of the
129 program.
130 .IP \(bu 2
131 \fBINFO\fP: This level provides general information about the application\(aqs
132 normal operation. It\(aqs used for messages that indicate the progress of the
133 application or highlight key points in the execution flow that are useful but
134 not indicative of any issues.
135 .IP \(bu 2
136 \fBWARNING\fP: This level indicates that something unexpected happened or that
137 there might be a potential problem. It\(aqs used for messages that are not
138 critical but could be of concern, signaling that attention might be needed.
139 .IP \(bu 2
140 \fBERROR\fP: This level is used when an error occurs that prevents a particular
141 operation from completing successfully. It\(aqs used to indicate significant
142 issues that need to be addressed but do not necessarily stop the application
143 from running.
144 .IP \(bu 2
145 \fBCRITICAL\fP: This is the highest level of severity, indicating a serious
146 error that has likely caused the application to terminate or will have severe
147 consequences if not addressed immediately. It\(aqs used for critical issues that
148 demand urgent attention.
149 .UNINDENT
150 .TP
151 .B \fB\-q\fP / \fB\-\-quiet\fP
152 Suppress all output. Useful for cron jobs or automated scripts.
153 .TP
154 .B \fB\-v\fP / \fB\-\-version\fP
155 Show the program version number and exit.
156 .UNINDENT
157 .SH SHORTCUTS
158 .sp
159 For some commands, you can use the following shortcuts or aliases to identify a backup
160 for a given server. Specifically, the \fBall\fP shortcut can be used to identify all
161 servers:
162 .TS
163 box center;
164 l|l.
165 T{
166 \fBShortcut\fP
167 T} T{
168 \fBDescription\fP
169 T}
170 _
171 T{
172 \fBall\fP
173 T} T{
174 All available servers
175 T}
176 _
177 T{
178 \fBfirst/oldest\fP
179 T} T{
180 Oldest available backup for the server, in chronological order.
181 T}
182 _
183 T{
184 \fBlast/latest\fP
185 T} T{
186 Most recent available backup for the server, in chronological order.
187 T}
188 _
189 T{
190 \fBlast\-full/latest\-full\fP
191 T} T{
192 Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&.
193 T}
194 _
195 T{
196 \fBlast\-failed\fP
197 T} T{
198 Most recent backup that failed, in chronological order.
199 T}
200 .TE
201 .SH EXIT STATUSES
202 .sp
203 Status code \fB0\fP means \fBsuccess\fP, while status code \fBNon\-Zero\fP means \fBfailure\fP\&.
204 .SH SUB-COMMANDS
205 .sp
206 \fBbarman\fP exposes several handy operations. This section is intended to describe each
207 of them.
208 .sp
209 In the following sections you can find a description of each command implemented by
210 \fBbarman\fP\&. Some of these commands may have more detailed information in another main
211 section in this documentation. If that is the case, a reference is provided to help you
212 quickly navigate to it.
213 .SS \fBbarman archive\-wal\fP
214 .SS Synopsis
215 .INDENT 0.0
216 .INDENT 3.5
217 .sp
218 .EX
219 archive\-wal
220 [ { \-h | \-\-help } ]
221 SERVER_NAME
222 .EE
223 .UNINDENT
224 .UNINDENT
225 .SS Description
226 .sp
227 Fetch WAL files received from either the standard \fBarchive_command\fP or streaming
228 replication with \fBpg_receivewal\fP and store them in the server\(aqs WAL archive. If you
229 have enabled \fBcompression\fP in the configuration file, the WAL files will be compressed
230 before they are archived.
231 .SS Parameters
232 .INDENT 0.0
233 .TP
234 .B \fBSERVER_NAME\fP
235 Name of the server in barman node.
236 .TP
237 .B \fB\-h\fP / \fB\-\-help\fP
238 Show a help message and exit. Provides information about command usage.
239 .UNINDENT
240 .SS \fBbarman backup\fP
241 .SS Synopsis
242 .INDENT 0.0
243 .INDENT 3.5
244 .sp
245 .EX
246 backup
247 [ \-\-bwlimit KBPS ]
248 [ \-\-cloud\-staging\-directory PATH ]
249 [ \-\-cloud\-staging\-max\-size SIZE ]
250 [ { \-h | \-\-help } ]
251 [ \-\-incremental BACKUP_ID ]
252 [ \-\-immediate\-checkpoint ]
253 [ { \-j | \-\-jobs } PARALLEL_WORKERS ]
254 [ \-\-jobs\-start\-batch\-period PERIOD ]
255 [ \-\-jobs\-start\-batch\-size SIZE ]
256 [ \-\-keepalive\-interval SECONDS ]
257 [ \-\-manifest ]
258 [ \-\-name NAME ]
259 [ \-\-no\-immediate\-checkpoint ]
260 [ \-\-no\-manifest ]
261 [ \-\-no\-retry ]
262 [ \-\-retry\-sleep SECONDS ]
263 [ \-\-retry\-times NUMBER ]
264 [ \-\-reuse\-backup { off | copy | link } ]
265 [ { \-\-wait | \-w } ]
266 [ \-\-wait\-timeout SECONDS ]
267 SERVER_NAME [ SERVER_NAME ... ]
268 .EE
269 .UNINDENT
270 .UNINDENT
271 .SS Description
272 .sp
273 Execute a PostreSQL server backup. Barman will use the parameters specified in the Global
274 and Server configuration files. Specify \fBall\fP shortcut instead of the server name to
275 execute backups from all servers configured in the Barman node. You can also specify
276 multiple server names in sequence to execute backups for specific servers.
277 .SS Parameters
278 .INDENT 0.0
279 .TP
280 .B \fBSERVER_NAME\fP
281 Name of the server in barman node.
282 .TP
283 .B \fB\-\-bwlimit\fP
284 Specify the maximum transfer rate in kilobytes per second. A value of 0 indicates no
285 limit. This setting overrides the \fBbandwidth_limit\fP configuration option.
286 .TP
287 .B \fB\-\-cloud\-staging\-directory\fP
288 A staging directory for when sending backups to a cloud object storage using
289 \fBbackup_method = postgres\fP\&. It is used as a temporary location for storing chunks
290 of the backup before they are sent to the cloud. Defaults to
291 \fB/tmp/barman/cloud\-staging\fP\&.
292 .TP
293 .B \fB\-\-cloud\-staging\-max\-size\fP
294 The maximum size that \fB\-\-cloud\-staging\-directory\fP can grow to before Barman stops
295 generating new backup chunks. This is used to prevent the staging directory from
296 growing in case the speed of uploading chunks does not keep up with the speed of
297 streaming them from Postgres. The default value is \fB30Gi\fP\&.
298 .sp
299 Extremely low values are discouraged as they may lead to performance degradation.
300 We recommend a minimum of at least \fB10Gi\fP\&. The optimal value will depend on the
301 transfer speed of the backup to Barman and from Barman to the cloud, as well as the
302 size of the backup.
303 .sp
304 The accepted format is \fBn{k|Ki|M|Mi|G|Gi|T|Ti}\fP and case\-sensitive, where \fBn\fP
305 is an integer greater than zero, with an optional SI or IEC suffix. k stands for
306 kilo with k = 1000, while Ki stands for kilobytes Ki = 1024. The rest of the options
307 have the same reasoning for greater units of measure.
308 .TP
309 .B \fB\-h\fP / \fB\-\-help\fP
310 Show a help message and exit. Provides information about command usage.
311 .TP
312 .B \fB\-\-incremental\fP
313 Execute a block\-level incremental backup. You must provide a \fBBACKUP_ID\fP or a
314 shortcut to a previous backup, which will serve as the parent backup for the
315 incremental backup.
316 .sp
317 \fBNote:\fP
318 .INDENT 7.0
319 .INDENT 3.5
320 The backup to be and the parent backup must have \fBbackup_method=postgres\fP\&.
321 .UNINDENT
322 .UNINDENT
323 .TP
324 .B \fB\-\-immediate\-checkpoint\fP
325 Forces the initial checkpoint to be executed as soon as possible, overriding any
326 value set for the \fBimmediate_checkpoint\fP parameter in the configuration file.
327 .TP
328 .B \fB\-j\fP / \fB\-\-jobs\fP
329 Specify the number of parallel workers to use for copying files during the backup.
330 This setting overrides the \fBparallel_jobs\fP parameter if it\(aqs specified in the
331 configuration file.
332 .TP
333 .B \fB\-\-jobs\-start\-batch\-period\fP
334 Specify the time period, in seconds, for starting a single batch of jobs. This value
335 overrides the \fBparallel_jobs_start_batch_period\fP parameter if it is set in the
336 configuration file. The default is \fB1\fP second.
337 .TP
338 .B \fB\-\-jobs\-start\-batch\-size\fP
339 Specify the maximum number of parallel workers to initiate in a single batch. This
340 value overrides the \fBparallel_jobs_start_batch_size\fP parameter if it is defined in
341 the configuration file. The default is \fB10\fP workers.
342 .TP
343 .B \fB\-\-keepalive\-interval\fP
344 Specify an interval, in seconds, for sending a heartbeat query to the server to keep
345 the libpq connection active during a Rsync backup. The default is \fB60\fP seconds. A
346 value of \fB0\fP disables the heartbeat.
347 .TP
348 .B \fB\-\-manifest\fP
349 Forces the creation of a backup manifest file upon completing a backup. Overrides the
350 \fBautogenerate_manifest\fP parameter from the configuration file. Applicable only to
351 rsync backup strategy.
352 .TP
353 .B \fB\-\-name\fP
354 Specify a friendly name for this backup which can be used in place of the backup ID
355 in barman commands.
356 .TP
357 .B \fB\-\-no\-immediate\-checkpoint\fP
358 Forces the backup to wait for the checkpoint to be executed overriding any value set
359 for the \fBimmediate_checkpoint\fP parameter in the configuration file.
360 .TP
361 .B \fB\-\-no\-manifest\fP
362 Disables the automatic creation of a backup manifest file upon completing a backup.
363 This setting overrides the \fBautogenerate_manifest\fP parameter from the configuration
364 file and applies only to rsync backup strategy.
365 .TP
366 .B \fB\-\-no\-retry\fP
367 There will be no retry in case of an error. It is the same as setting
368 \fB\-\-retry\-times 0\fP\&.
369 .TP
370 .B \fB\-\-retry\-sleep\fP
371 Specify the number of seconds to wait after a failed copy before retrying. This
372 setting applies to both backup and recovery operations and overrides the
373 \fBbasebackup_retry_sleep\fP parameter if it is defined in the configuration file.
374 .TP
375 .B \fB\-\-retry\-times\fP
376 Specify the number of times to retry the base backup copy in case of an error. This
377 applies to both backup and recovery operations and overrides the
378 \fBbasebackup_retry_times\fP parameter if it is set in the configuration file.
379 .TP
380 .B \fB\-\-reuse\-backup\fP
381 Overrides the behavior of the \fBreuse_backup\fP option configured in the configuration
382 file. The possible values are:
383 .INDENT 7.0
384 .IP \(bu 2
385 \fBoff\fP: Do not reuse the last available backup.
386 .IP \(bu 2
387 \fBcopy\fP: Reuse the last available backup for a server and create copies of
388 unchanged files (reduces backup time).
389 .IP \(bu 2
390 \fBlink\fP (default): Reuse the last available backup for a server and create
391 hard links to unchanged files (saves both backup time and space).
392 .UNINDENT
393 .sp
394 \fBNote:\fP
395 .INDENT 7.0
396 .INDENT 3.5
397 This will only have any effect if the last available backup was
398 executed with \fBbackup_method=rsync\fP\&.
399 .UNINDENT
400 .UNINDENT
401 .TP
402 .B \fB\-\-wait\fP / \fB\-w\fP
403 Wait for all necessary WAL files required by the base backup to be archived.
404 .TP
405 .B \fB\-\-wait\-timeout\fP
406 Specify the duration, in seconds, to wait for the required WAL files to be archived
407 before timing out.
408 .UNINDENT
409 .SS Shortcuts
410 .sp
411 Use shortcuts instead of \fBSERVER_NAME\fP\&.
412 .TS
413 box center;
414 l|l.
415 T{
416 \fBShortcut\fP
417 T} T{
418 \fBDescription\fP
419 T}
420 _
421 T{
422 \fBall\fP
423 T} T{
424 All available servers
425 T}
426 .TE
427 .SS \fBbarman check\-archived\-wal\-range\fP
428 .SS Synopsis
429 .INDENT 0.0
430 .INDENT 3.5
431 .sp
432 .EX
433 check\-archived\-wal\-range
434 [ { \-h | \-\-help } ]
435 SERVER_NAME BEGIN_WAL END_WAL
436 .EE
437 .UNINDENT
438 .UNINDENT
439 .SS Description
440 .sp
441 Check that all WAL segments in the range from \fBBEGIN_WAL\fP to \fBEND_WAL\fP (inclusive)
442 are present in the WAL archive of the specified server. If any segments are missing,
443 they are listed and the command exits with a non\-zero status. Exits with status 0 when
444 the sequence is complete.
445 .sp
446 This command scans the WAL archive directory directly, so it reflects the actual
447 state of the storage rather than Barman\(aqs internal index.
448 .SS Parameters
449 .INDENT 0.0
450 .TP
451 .B \fBSERVER_NAME\fP
452 Name of the server in barman node.
453 .TP
454 .B \fBBEGIN_WAL\fP
455 Name of the first WAL segment in the range to verify (inclusive).
456 .TP
457 .B \fBEND_WAL\fP
458 Name of the last WAL segment in the range to verify (inclusive).
459 .TP
460 .B \fB\-h\fP / \fB\-\-help\fP
461 Show a help message and exit. Provides information about command usage.
462 .UNINDENT
463 .SS \fBbarman check\-backup\fP
464 .SS Synopsis
465 .INDENT 0.0
466 .INDENT 3.5
467 .sp
468 .EX
469 check\-backup
470 [ { \-h | \-\-help } ]
471 SERVER_NAME BACKUP_ID
472 .EE
473 .UNINDENT
474 .UNINDENT
475 .SS Description
476 .sp
477 Check that all necessary WAL files for verifying the consistency of a physical backup are
478 properly archived. This command is automatically executed by the cron job and at the end
479 of each backup operation. You can use a shortcut instead of \fBBACKUP_ID\fP\&.
480 .SS Parameters
481 .INDENT 0.0
482 .TP
483 .B \fBSERVER_NAME\fP
484 Name of the server in barman node.
485 .TP
486 .B \fBBACKUP_ID\fP
487 Id of the backup in barman catalog.
488 .TP
489 .B \fB\-h\fP / \fB\-\-help\fP
490 Show a help message and exit. Provides information about command usage.
491 .UNINDENT
492 .SS Shortcuts
493 .sp
494 Use shortcuts instead of \fBBACKUP_ID\fP\&.
495 .TS
496 box center;
497 l|l.
498 T{
499 \fBShortcut\fP
500 T} T{
501 \fBDescription\fP
502 T}
503 _
504 T{
505 \fBfirst/oldest\fP
506 T} T{
507 Oldest available backup for the server, in chronological order.
508 T}
509 _
510 T{
511 \fBlast/latest\fP
512 T} T{
513 Most recent available backup for the server, in chronological order.
514 T}
515 _
516 T{
517 \fBlast\-full/latest\-full\fP
518 T} T{
519 Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&.
520 T}
521 _
522 T{
523 \fBlast\-failed\fP
524 T} T{
525 Most recent backup that failed, in chronological order.
526 T}
527 .TE
528 .SS \fBbarman check\fP
529 .SS Synopsis
530 .INDENT 0.0
531 .INDENT 3.5
532 .sp
533 .EX
534 check
535 [ { \-h | \-\-help } ]
536 [ \-\-nagios ]
537 SERVER_NAME [ SERVER_NAME ... ]
538 .EE
539 .UNINDENT
540 .UNINDENT
541 .SS Description
542 .sp
543 Display status information about a server, such as SSH connection, Postgres version,
544 configuration and backup directories, archiving and streaming processes, replication
545 slots, and more. Use \fBall\fP as shortcut to show diagnostic information for all
546 configured servers.
547 .SS Parameters
548 .INDENT 0.0
549 .TP
550 .B \fBSERVER_NAME\fP
551 Name of the server in barman node.
552 .TP
553 .B \fB\-h\fP / \fB\-\-help\fP
554 Show a help message and exit. Provides information about command usage.
555 .TP
556 .B \fB\-\-nagios\fP
557 Nagios plugin compatible output.
558 .UNINDENT
559 .SS Shortcuts
560 .sp
561 Use shortcuts instead of \fBSERVER_NAME\fP\&.
562 .TS
563 box center;
564 l|l.
565 T{
566 \fBShortcut\fP
567 T} T{
568 \fBDescription\fP
569 T}
570 _
571 T{
572 \fBall\fP
573 T} T{
574 All available servers
575 T}
576 .TE
577 .SS \fBbarman cloud\-wal\-archive\fP
578 .SS Synopsis
579 .INDENT 0.0
580 .INDENT 3.5
581 .sp
582 .EX
583 cloud\-wal\-archive
584 [ { \-h | \-\-help } ]
585 [ { \-p | \-\-parallel } PARALLEL ]
586 SERVER_NAME WAL_PATH
587 .EE
588 .UNINDENT
589 .UNINDENT
590 .SS Description
591 .sp
592 Push a WAL file from the local disk to a configured cloud object storage. This command
593 is intended to be used in the \fBarchive_command\fP of a Postgres server when using the
594 \fBlocal\-to\-cloud\fP backup method for taking base backups.
595 .sp
596 \fBNote:\fP
597 .INDENT 0.0
598 .INDENT 3.5
599 The compression algorithm and level used for the WAL files can be configured in the
600 Barman server configuration file. If not specified, the WAL file will be uploaded
601 without compression.
602 .UNINDENT
603 .UNINDENT
604 .SS Parameters
605 .INDENT 0.0
606 .TP
607 .B \fBSERVER_NAME\fP
608 The name of the Postgres server for which the WAL file is being archived.
609 .TP
610 .B \fBWAL_PATH\fP
611 The value of the \fB%p\fP keyword (according to \fBarchive_command\fP).
612 .TP
613 .B \fB\-h\fP / \fB\-\-help\fP
614 Show a help message and exit. Provides information about command usage.
615 .TP
616 .B \fB\-p\fP / \fB\-\-parallel\fP
617 Number of WALs to archive in parallel. When set to a value greater than \fB1\fP,
618 up to \fBparallel \- 1\fP additional WAL files that are ready in
619 \fBpg_wal/archive_status\fP are uploaded concurrently in background processes after
620 the primary WAL has been successfully archived. This can reduce WAL archival backlog
621 during periods of high WAL generation. Defaults to the
622 \fBcloud_wal_archive_parallel\fP server configuration value, which itself defaults
623 to \fB0\fP (disabled).
624 .UNINDENT
625 .SS \fBbarman cloud\-wal\-restore\fP
626 .SS Synopsis
627 .INDENT 0.0
628 .INDENT 3.5
629 .sp
630 .EX
631 cloud\-wal\-restore
632 [ { \-h | \-\-help } ]
633 [ { \-p | \-\-parallel } PARALLEL ]
634 [ \-\-spool\-dir SPOOL_DIR ]
635 SERVER_NAME WAL_NAME WAL_DEST
636 .EE
637 .UNINDENT
638 .UNINDENT
639 .SS Description
640 .sp
641 Pull a WAL file from a configured cloud object storage to the local disk. This command
642 is intended to be used as \fBrestore_command\fP in Postgres when restoring WALs from a
643 cloud object storage.
644 .sp
645 This command requires the server to have cloud storage configured via \fBwals_directory\fP
646 pointing to a cloud URL (e.g., \fBs3://barman/wals\fP).
647 .SS Parameters
648 .INDENT 0.0
649 .TP
650 .B \fBSERVER_NAME\fP
651 The name of the Postgres server for which the WAL file is being restored.
652 .TP
653 .B \fBWAL_NAME\fP
654 The value of the \fB%f\fP keyword (according to \fBrestore_command\fP).
655 .TP
656 .B \fBWAL_DEST\fP
657 The value of the \fB%p\fP keyword (according to \fBrestore_command\fP).
658 .TP
659 .B \fB\-h\fP / \fB\-\-help\fP
660 Show a help message and exit.
661 .TP
662 .B \fB\-p\fP / \fB\-\-parallel\fP
663 Specifies the number of WAL files to peek and download in parallel. When set to a
664 value greater than \fB1\fP, fetches the requested WAL file along with the next
665 \fBN \- 1\fP files simultaneously. The additional files are staged in the spool
666 directory so that subsequent restore requests can be served immediately from local
667 storage. Default is \fB0\fP (disabled).
668 .TP
669 .B \fB\-\-spool\-dir\fP
670 Directory used for staging extra WALs fetched when using \fB\-\-parallel\fP\&. Default is
671 \fB/var/tmp/walrestore\fP\&.
672 .UNINDENT
673 .sp
674 \fBTip:\fP
675 .INDENT 0.0
676 .INDENT 3.5
677 When using \fB\-\-parallel\fP and both the \fBpg_wal\fP directory and the spool directory
678 are on the same filesystem, WAL files are served faster because they are renamed
679 rather than copied.
680 .UNINDENT
681 .UNINDENT
682 .SS \fBbarman config\-switch\fP
683 .SS Synopsis
684 .INDENT 0.0
685 .INDENT 3.5
686 .sp
687 .EX
688 config\-switch
689 [ { \-h | \-\-help } ]
690 SERVER_NAME { \-\-reset | MODEL_NAME }
691 .EE
692 .UNINDENT
693 .UNINDENT
694 .SS Description
695 .sp
696 Apply a set of configuration overrides from the model to a server in Barman. The final
697 configuration will combine or override the server\(aqs existing settings with the ones
698 specified in the model. You can reset the server configurations with the \fB\-\-reset\fP
699 argument.
700 .sp
701 \fBNote:\fP
702 .INDENT 0.0
703 .INDENT 3.5
704 Only one model can be active at a time for a given server.
705 .UNINDENT
706 .UNINDENT
707 .SS Parameters
708 .INDENT 0.0
709 .TP
710 .B \fBSERVER_NAME\fP
711 Name of the server in barman node.
712 .TP
713 .B \fBMODEL_NAME\fP
714 Name of the model.
715 .TP
716 .B \fB\-h\fP / \fB\-\-help\fP
717 Show a help message and exit. Provides information about command usage.
718 .TP
719 .B \fB\-\-reset\fP
720 Reset the server\(aqs configurations.
721 .UNINDENT
722 .SS \fBbarman config\-update\fP
723 .SS Synopsis
724 .INDENT 0.0
725 .INDENT 3.5
726 .sp
727 .EX
728 config\-update
729 [ { \-h | \-\-help } ]
730 STRING
731 .EE
732 .UNINDENT
733 .UNINDENT
734 .SS Description
735 .sp
736 Create or update the configurations for servers and/or models in Barman. The parameter
737 should be a JSON string containing an array of documents. Each document must include a
738 \fBscope\fP key, which can be either server or model, and either a \fBserver_name\fP or
739 \fBmodel_name\fP key, depending on the scope value. Additionally, the document should
740 include other keys representing Barman configuration options and their desired values.
741 .sp
742 \fBNote:\fP
743 .INDENT 0.0
744 .INDENT 3.5
745 The barman \fBconfig\-update\fP command writes configuration options to a file named
746 \fB\&.barman.auto.conf\fP, located in the \fBbarman_home\fP directory. This configuration
747 file has higher precedence and will override values from the global Barman
748 configuration file (usually \fB/etc/barman.conf\fP) and from any included files specified
749 in \fBconfiguration_files_directory\fP (typically files in \fB/etc/barman.d\fP). Be aware
750 of this if you decide to manually modify configuration options in those files later.
751 .UNINDENT
752 .UNINDENT
753 .SS Parameters
754 .INDENT 0.0
755 .TP
756 .B \fBSTRING\fP
757 List of JSON formatted string.
758 .TP
759 .B \fB\-h\fP / \fB\-\-help\fP
760 Show a help message and exit. Provides information about command usage.
761 .UNINDENT
762 .SS Example
763 .sp
764 \fBJSON_STRING=\(aq[{“scope”: “server”, “server_name”: “my_server”, “archiver”:
765 “on”, “streaming_archiver”: “off”}]\(aq\fP
766 .SS \fBbarman cron\fP
767 .SS Synopsis
768 .INDENT 0.0
769 .INDENT 3.5
770 .sp
771 .EX
772 cron
773 [ { \-h | \-\-help } ]
774 [ \-\-keep\-descriptors ]
775 .EE
776 .UNINDENT
777 .UNINDENT
778 .SS Description
779 .sp
780 Carry out maintenance tasks, such as enforcing retention policies or managing WAL files.
781 .SS Parameters
782 .INDENT 0.0
783 .TP
784 .B \fB\-h\fP / \fB\-\-help\fP
785 Show a help message and exit. Provides information about command usage.
786 .TP
787 .B \fB\-\-keep\-descriptors\fP
788 Keep the ^stdout^ and ^stderr^ streams of the Barman subprocesses connected to the
789 main process. This is especially useful for Docker\-based installations.
790 .UNINDENT
791 .SS \fBbarman delete\fP
792 .SS Synopsis
793 .INDENT 0.0
794 .INDENT 3.5
795 .sp
796 .EX
797 delete
798 [ { \-h | \-\-help } ]
799 SERVER_NAME BACKUP_ID
800 .EE
801 .UNINDENT
802 .UNINDENT
803 .SS Description
804 .sp
805 Delete the specified backup. You can use a shortcut instead of \fBBACKUP_ID\fP\&.
806 .SS Parameters
807 .INDENT 0.0
808 .TP
809 .B \fBSERVER_NAME\fP
810 Name of the server in barman node
811 .TP
812 .B \fBBACKUP_ID\fP
813 Id of the backup in barman catalog.
814 .TP
815 .B \fB\-h\fP / \fB\-\-help\fP
816 Show a help message and exit. Provides information about command usage.
817 .UNINDENT
818 .SS Shortcuts
819 .sp
820 Use shortcuts instead of \fBBACKUP_ID\fP\&.
821 .TS
822 box center;
823 l|l.
824 T{
825 \fBShortcut\fP
826 T} T{
827 \fBDescription\fP
828 T}
829 _
830 T{
831 \fBfirst/oldest\fP
832 T} T{
833 Oldest available backup for the server, in chronological order.
834 T}
835 _
836 T{
837 \fBlast/latest\fP
838 T} T{
839 Most recent available backup for the server, in chronological order.
840 T}
841 _
842 T{
843 \fBlast\-full/latest\-full\fP
844 T} T{
845 Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&.
846 T}
847 _
848 T{
849 \fBlast\-failed\fP
850 T} T{
851 Most recent backup that failed, in chronological order.
852 T}
853 .TE
854 .SS \fBbarman diagnose\fP
855 .SS Synopsis
856 .INDENT 0.0
857 .INDENT 3.5
858 .sp
859 .EX
860 diagnose
861 [ { \-h | \-\-help } ]
862 [ \-\-show\-config\-source ]
863 .EE
864 .UNINDENT
865 .UNINDENT
866 .SS Description
867 .sp
868 Display diagnostic information about the Barman node, which is the server where Barman
869 is installed, as well as all configured Postgres servers. This includes details such as
870 global configuration, SSH version, Python version, rsync version, the current
871 configuration and status of all servers, and many more.
872 .SS Parameters
873 .INDENT 0.0
874 .TP
875 .B \fB\-h\fP / \fB\-\-help\fP
876 Show a help message and exit. Provides information about command usage.
877 .TP
878 .B \fB\-\-show\-config\-source\fP
879 Include the source file which provides the effective value for each configuration
880 option.
881 .UNINDENT
882 .SS \fBbarman export\-backup\fP
883 .SS Synopsis
884 .INDENT 0.0
885 .INDENT 3.5
886 .sp
887 .EX
888 export\-backup
889 [ { \-h | \-\-help } ]
890 [ \-\-compression { gzip | bzip2 | xz } ]
891 [ \-\-compression\-level COMPRESSION_LEVEL ]
892 SERVER_NAME BACKUP_ID OUTPUT_DIRECTORY
893 .EE
894 .UNINDENT
895 .UNINDENT
896 .SS Description
897 .sp
898 Export the specified backup as a single tarball, suitable for hand\-off to an
899 external archival system. The tarball is self\-contained: it bundles the
900 backup data files, any tablespaces, the WAL segments required to bring the
901 backup to a consistent state, and the Barman metadata needed to re\-register
902 the backup with barman import\-backup \%<#\:commands-barman-import-backup> later.
903 .sp
904 The generated file is named using the pattern
905 \fBbackup\-export\-SERVER_NAME\-BACKUP_ID\-TIMESTAMP\-CHECKSUM.tar[.gz|.bz2|.xz]\fP\&.
906 The filename is part of the integrity contract — do not rename the tarball,
907 or barman import\-backup \%<#\:commands-barman-import-backup> will refuse it.
908 .sp
909 Only full backups in \fBDONE\fP state on a server using local storage can be
910 exported. See Backup export and import \%<#\:user-guide-export-import> for the full feature
911 description.
912 .SS Parameters
913 .INDENT 0.0
914 .TP
915 .B \fBSERVER_NAME\fP
916 Name of the server in barman node.
917 .TP
918 .B \fBBACKUP_ID\fP
919 Id of the backup in barman catalog.
920 .TP
921 .B \fBOUTPUT_DIRECTORY\fP
922 Existing directory where the exported tarball will be written. Must be
923 writable and executable by the user running Barman.
924 .TP
925 .B \fB\-\-compression {gzip | bzip2 | xz}\fP
926 Compress the outer tarball using the given algorithm. By default the
927 tarball is not compressed. Compression applies only to the outer
928 tarball; data files and WAL segments stored inside are not recompressed,
929 and any pre\-existing WAL compression is preserved through the
930 associated \fBxlog.db\fP metadata.
931 .TP
932 .B \fB\-\-compression\-level COMPRESSION_LEVEL\fP
933 Compression level to pass to the chosen algorithm. Valid levels are
934 \fB1\fP\-\fB9\fP for \fBgzip\fP and \fBbzip2\fP, and \fB0\fP\-\fB9\fP for \fBxz\fP\&.
935 Defaults to the algorithm\(aqs own default level. Requires
936 \fB\-\-compression\fP to be set.
937 .sp
938 \fBNote:\fP
939 .INDENT 7.0
940 .INDENT 3.5
941 Passing an explicit \fB\-\-compression\-level\fP requires Python 3.12 or
942 newer for \fBgzip\fP/\fBbzip2\fP and Python 3.14 or newer for \fBxz\fP\&. On
943 older interpreters the option is accepted, a warning is emitted, and
944 the algorithm\(aqs default level is used instead.
945 .UNINDENT
946 .UNINDENT
947 .UNINDENT
948 .SS \fBbarman generate\-manifest\fP
949 .SS Synopsis
950 .INDENT 0.0
951 .INDENT 3.5
952 .sp
953 .EX
954 generate\-manifest
955 [ { \-h | \-\-help } ]
956 SERVER_NAME BACKUP_ID
957 .EE
958 .UNINDENT
959 .UNINDENT
960 .SS Description
961 .sp
962 Generates a \fBbackup_manifest\fP file for a backup. You can use a shortcut instead of
963 \fBBACKUP_ID\fP\&.
964 .SS Parameters
965 .INDENT 0.0
966 .TP
967 .B \fBSERVER_NAME\fP
968 Name of the server in barman node
969 .TP
970 .B \fBBACKUP_ID\fP
971 Id of the backup in barman catalog.
972 .TP
973 .B \fB\-h\fP / \fB\-\-help\fP
974 Show a help message and exit. Provides information about command usage.
975 .UNINDENT
976 .SS Shortcuts
977 .sp
978 Use shortcuts instead of \fBBACKUP_ID\fP\&.
979 .TS
980 box center;
981 l|l.
982 T{
983 \fBShortcut\fP
984 T} T{
985 \fBDescription\fP
986 T}
987 _
988 T{
989 \fBfirst/oldest\fP
990 T} T{
991 Oldest available backup for the server, in chronological order.
992 T}
993 _
994 T{
995 \fBlast/latest\fP
996 T} T{
997 Most recent available backup for the server, in chronological order.
998 T}
999 _
1000 T{
1001 \fBlast\-full/latest\-full\fP
1002 T} T{
1003 Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&.
1004 T}
1005 _
1006 T{
1007 \fBlast\-failed\fP
1008 T} T{
1009 Most recent backup that failed, in chronological order.
1010 T}
1011 .TE
1012 .SS \fBbarman get\-wal\fP
1013 .SS Synopsis
1014 .INDENT 0.0
1015 .INDENT 3.5
1016 .sp
1017 .EX
1018 get\-wal
1019 [ { \-\-bzip | \-j } ]
1020 [ { \-\-gzip | \-z | \-x } ]
1021 [ { \-h | \-\-help } ]
1022 [ \-\-keep\-compression ]
1023 [ { \-\-output\-directory | \-o } OUTPUT_DIRECTORY ]
1024 [ { \-\-peek | \-p } VALUE ]
1025 [ { \-P | \-\-partial } ]
1026 [ { \-t | \-\-test } ]
1027 SERVER_NAME WAL_NAME
1028 .EE
1029 .UNINDENT
1030 .UNINDENT
1031 .SS Description
1032 .sp
1033 Retrieve a WAL file from the xlog archive of a specified server. By default, if the
1034 requested WAL file is found, it is returned as uncompressed content to \fBSTDOUT\fP\&.
1035 .SS Parameters
1036 .INDENT 0.0
1037 .TP
1038 .B \fBSERVER_NAME\fP
1039 Name of the server in barman node
1040 .TP
1041 .B \fBWAL_NAME\fP
1042 Id of the backup in barman catalog.
1043 .TP
1044 .B \fB\-\-bzip2\fP / \fB\-j\fP
1045 Output will be compressed using bzip2.
1046 .TP
1047 .B \fB\-\-gzip\fP / \fB\-z\fP / \fB\-x\fP
1048 Output will be compressed using gzip.
1049 .TP
1050 .B \fB\-h\fP / \fB\-\-help\fP
1051 Show a help message and exit. Provides information about command usage.
1052 .TP
1053 .B \fB\-\-keep\-compression\fP
1054 Do not decompress the file content. The output will be the original compressed
1055 file.
1056 .TP
1057 .B \fB\-\-output\-directory\fP / \fB\-o\fP
1058 Destination directory where barman will store the WAL file.
1059 .TP
1060 .B \fB\-\-peek\fP / \fB\-p\fP
1061 Specify an integer value greater than or equal to 1 to retrieve WAL files from the
1062 specified WAL file up to the value specified by this parameter. When using this option,
1063 \fBget\-wal\fP returns a list of zero to the specified WAL segment names, with one name
1064 per row.
1065 .TP
1066 .B \fB\-P\fP / \fB\-\-partial\fP
1067 Additionally, collect partial WAL files (.partial).
1068 .TP
1069 .B \fB\-t\fP / \fB\-\-test\fP
1070 Test both the connection and configuration of the specified Postgres server in
1071 Barman for WAL retrieval. When this option is used, the required \fBWAL_NAME\fP
1072 argument is disregarded.
1073 .UNINDENT
1074 .sp
1075 \fBWarning:\fP
1076 .INDENT 0.0
1077 .INDENT 3.5
1078 \fB\-z\fP / \fB\-\-gzip\fP and \fB\-j\fP / \fB\-\-bzip2\fP options are deprecated and will be
1079 removed in the future. For WAL compression, please make sure to enable it directly
1080 on the Barman server via the \fBcompression\fP configuration option.
1081 .UNINDENT
1082 .UNINDENT
1083 .SS \fBbarman import\-backup\fP
1084 .SS Synopsis
1085 .INDENT 0.0
1086 .INDENT 3.5
1087 .sp
1088 .EX
1089 import\-backup
1090 [ { \-h | \-\-help } ]
1091 SERVER_NAME INPUT_TARBALL
1092 .EE
1093 .UNINDENT
1094 .UNINDENT
1095 .SS Description
1096 .sp
1097 Register a previously exported backup tarball back into the Barman catalog of
1098 \fBSERVER_NAME\fP\&. The tarball is expected to be the output of
1099 barman export\-backup \%<#\:commands-barman-export-backup> (or a file restored to disk verbatim by
1100 an external archival system from such an export). After a successful import,
1101 the backup is fully usable: it appears in barman list\-backups \%<#\:commands-barman-list-backups>,
1102 its metadata is available via barman show\-backup \%<#\:commands-barman-show-backup>, and it can
1103 be restored with barman restore \%<#\:commands-barman-restore>\&.
1104 .sp
1105 Imported backups are automatically protected from retention by applying the
1106 \fBKEEP:STANDALONE\fP annotation (see barman keep \%<#\:commands-barman-keep>). If you want
1107 the imported backup to participate in retention again, remove the annotation
1108 explicitly.
1109 .sp
1110 Import is performed atomically: the tarball is extracted into a staging
1111 directory under \fBbasebackups_directory\fP, verified end\-to\-end, and only
1112 then moved into place. If any step fails, the staging area is cleaned up
1113 and the catalog and WAL archive are left untouched. See this section
1114 Backup export and import \%<#\:user-guide-export-import> for the full feature description.
1115 .SS Parameters
1116 .INDENT 0.0
1117 .TP
1118 .B \fBSERVER_NAME\fP
1119 Name of the server in barman node.
1120 .TP
1121 .B \fBINPUT_TARBALL\fP
1122 Path to the export tarball to import.
1123 .UNINDENT
1124 .SS \fBbarman keep\fP
1125 .SS Synopsis
1126 .INDENT 0.0
1127 .INDENT 3.5
1128 .sp
1129 .EX
1130 keep
1131 [ { \-h | \-\-help } ]
1132 { { \-r | \-\-release } | { \-s | \-\-status } | \-\-target { full | standalone } }
1133 SERVER_NAME BACKUP_ID
1134 .EE
1135 .UNINDENT
1136 .UNINDENT
1137 .SS Description
1138 .sp
1139 Mark the specified backup with a \fBtarget\fP as an archival backup to be retained
1140 indefinitely, overriding any active retention policies. You can also check the keep
1141 \fBstatus\fP of a backup and \fBrelease\fP the keep mark from a backup. You can use a
1142 shortcut instead of \fBBACKUP_ID\fP\&.
1143 .sp
1144 \fBNote:\fP
1145 .INDENT 0.0
1146 .INDENT 3.5
1147 Incremental backups are not eligible for the \fBkeep\fP command. This restriction exists
1148 because incremental backups rely on their parent backups and cannot be used on their
1149 own for recovery. Keeping an incremental without its base would serve no purpose, as
1150 it is unusable independently.
1151 .sp
1152 If you attempt to apply keep to an incremental backup, Barman will return an error
1153 indicating that incremental backups cannot be kept.
1154 .sp
1155 \fBOnly the full base backup —the one that starts the backup chain— can be marked with
1156 keep.\fP
1157 .UNINDENT
1158 .UNINDENT
1159 .SS Parameters
1160 .INDENT 0.0
1161 .TP
1162 .B \fBSERVER_NAME\fP
1163 Name of the server in barman node
1164 .TP
1165 .B \fBBACKUP_ID\fP
1166 Id of the backup in barman catalog.
1167 .TP
1168 .B \fB\-h\fP / \fB\-\-help\fP
1169 Show a help message and exit. Provides information about command usage.
1170 .TP
1171 .B \fB\-r\fP / \fB\-\-release\fP
1172 Release the keep mark from this backup. This will remove its archival status and
1173 make it available for deletion, either directly or by retention policy.
1174 .TP
1175 .B \fB\-s\fP / \fB\-\-status\fP
1176 Report the archival status of the backup. The status will be either \fBfull\fP or
1177 \fBstandalone\fP for archival backups, or \fBnokeep\fP for backups that have not been
1178 designated as archival.
1179 .TP
1180 .B \fB\-\-target\fP
1181 Define the recovery target for the archival backup. The possible values are:
1182 .INDENT 7.0
1183 .IP \(bu 2
1184 \fBfull\fP: The backup can be used to recover to the most recent point in time. To
1185 support this, Barman will keep all necessary WALs to maintain the backup\(aqs
1186 consistency as well as any subsequent WALs.
1187 .IP \(bu 2
1188 \fBstandalone\fP: The backup can only be used to restore the server to its state at the
1189 time of the backup. Barman will retain only the WALs required to ensure the
1190 backup\(aqs consistency.
1191 .UNINDENT
1192 .UNINDENT
1193 .SS Shortcuts
1194 .sp
1195 Use shortcuts instead of \fBBACKUP_ID\fP\&.
1196 .TS
1197 box center;
1198 l|l.
1199 T{
1200 \fBShortcut\fP
1201 T} T{
1202 \fBDescription\fP
1203 T}
1204 _
1205 T{
1206 \fBfirst/oldest\fP
1207 T} T{
1208 Oldest available backup for the server, in chronological order.
1209 T}
1210 _
1211 T{
1212 \fBlast/latest\fP
1213 T} T{
1214 Most recent available backup for the server, in chronological order.
1215 T}
1216 _
1217 T{
1218 \fBlast\-full/latest\-full\fP
1219 T} T{
1220 Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&.
1221 T}
1222 _
1223 T{
1224 \fBlast\-failed\fP
1225 T} T{
1226 Most recent backup that failed, in chronological order.
1227 T}
1228 .TE
1229 .SS \fBbarman list\-backups\fP
1230 .SS Synopsis
1231 .INDENT 0.0
1232 .INDENT 3.5
1233 .sp
1234 .EX
1235 list\-backups
1236 [ { \-h | \-\-help } ]
1237 [ \-\-minimal ]
1238 SERVER_NAME
1239 .EE
1240 .UNINDENT
1241 .UNINDENT
1242 .SS Description
1243 .sp
1244 Display the available backups for a server. This command is useful for retrieving both
1245 the backup ID and the backup type. You can find details about this command in
1246 Catalog usage \%<#\:catalog-usage-list-backups>\&.
1247 .SS Parameters
1248 .INDENT 0.0
1249 .TP
1250 .B \fBSERVER_NAME\fP
1251 Name of the server in barman node
1252 .TP
1253 .B \fB\-h\fP / \fB\-\-help\fP
1254 Show a help message and exit. Provides information about command usage.
1255 .TP
1256 .B \fB\-\-minimal\fP
1257 Machine readable output.
1258 .UNINDENT
1259 .SS Shortcuts
1260 .sp
1261 Use shortcuts instead of \fBSERVER_NAME\fP\&.
1262 .TS
1263 box center;
1264 l|l.
1265 T{
1266 \fBShortcut\fP
1267 T} T{
1268 \fBDescription\fP
1269 T}
1270 _
1271 T{
1272 \fBall\fP
1273 T} T{
1274 All available servers
1275 T}
1276 .TE
1277 .SS \fBbarman list\-files\fP
1278 .SS Synopsis
1279 .INDENT 0.0
1280 .INDENT 3.5
1281 .sp
1282 .EX
1283 list\-files
1284 [ { \-h | \-\-help } ]
1285 [ \-\-target { data | full | standalone | wal } ]
1286 [ \-\-list\-empty\-directories ]
1287 SERVER_NAME BACKUP_ID
1288 .EE
1289 .UNINDENT
1290 .UNINDENT
1291 .SS Description
1292 .sp
1293 List all files in a specific backup. You can use a shortcut instead of \fBBACKUP_ID\fP\&.
1294 .SS Parameters
1295 .INDENT 0.0
1296 .TP
1297 .B \fBSERVER_NAME\fP
1298 Name of the server in barman node
1299 .TP
1300 .B \fBBACKUP_ID\fP
1301 Id of the backup in barman catalog.
1302 .TP
1303 .B \fB\-h\fP / \fB\-\-help\fP
1304 Show a help message and exit. Provides information about command usage.
1305 .TP
1306 .B \fB\-\-target\fP
1307 Define specific files to be listed. The possible values are:
1308 .INDENT 7.0
1309 .IP \(bu 2
1310 \fBstandalone\fP (default): List the base backup files, including required WAL files.
1311 .IP \(bu 2
1312 \fBdata\fP: List just the data files.
1313 .IP \(bu 2
1314 \fBwal\fP: List all the WAL files between the start of the base backup and the end of
1315 the log or the start of the following base backup (depending on whether the
1316 specified base backup is the most recent one available).
1317 .IP \(bu 2
1318 \fBfull\fP: same as \fBdata\fP + \fBwal\fP\&.
1319 .UNINDENT
1320 .TP
1321 .B \fB\-\-list\-empty\-directories\fP
1322 Add empty directories to the listing.
1323 .UNINDENT
1324 .SS Shortcuts
1325 .sp
1326 Use shortcuts instead of \fBBACKUP_ID\fP\&.
1327 .TS
1328 box center;
1329 l|l.
1330 T{
1331 \fBShortcut\fP
1332 T} T{
1333 \fBDescription\fP
1334 T}
1335 _
1336 T{
1337 \fBfirst/oldest\fP
1338 T} T{
1339 Oldest available backup for the server, in chronological order.
1340 T}
1341 _
1342 T{
1343 \fBlast/latest\fP
1344 T} T{
1345 Most recent available backup for the server, in chronological order.
1346 T}
1347 _
1348 T{
1349 \fBlast\-full/latest\-full\fP
1350 T} T{
1351 Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&.
1352 T}
1353 _
1354 T{
1355 \fBlast\-failed\fP
1356 T} T{
1357 Most recent backup that failed, in chronological order.
1358 T}
1359 .TE
1360 .SS \fBbarman list\-processes\fP
1361 .SS Synopsis
1362 .INDENT 0.0
1363 .INDENT 3.5
1364 .sp
1365 .EX
1366 list\-processes
1367 [ { \-h | \-\-help } ]
1368 SERVER_NAME
1369 .EE
1370 .UNINDENT
1371 .UNINDENT
1372 .SS Description
1373 .sp
1374 The \fBlist\-processes\fP sub\-command outputs all active subprocesses for a Postgres server.
1375 It displays the process identifier (PID) and the corresponding barman task for each active
1376 subprocess.
1377 .SS Parameters
1378 .INDENT 0.0
1379 .TP
1380 .B \fBSERVER_NAME\fP
1381 Name of the Postgres server for which to list active subprocesses.
1382 .TP
1383 .B \fB\-h\fP / \fB\-\-help\fP
1384 Displays a help message and exits.
1385 .UNINDENT
1386 .SS \fBbarman list\-servers\fP
1387 .SS Synopsis
1388 .INDENT 0.0
1389 .INDENT 3.5
1390 .sp
1391 .EX
1392 list\-servers
1393 [ { \-h | \-\-help } ]
1394 [ \-\-minimal ]
1395 .EE
1396 .UNINDENT
1397 .UNINDENT
1398 .SS Description
1399 .sp
1400 Display all configured servers along with their descriptions.
1401 .SS Parameters
1402 .INDENT 0.0
1403 .TP
1404 .B \fB\-h\fP / \fB\-\-help\fP
1405 Show a help message and exit. Provides information about command usage.
1406 .TP
1407 .B \fB\-\-minimal\fP
1408 Machine readable output.
1409 .UNINDENT
1410 .SS \fBbarman lock\-directory\-cleanup\fP
1411 .SS Synopsis
1412 .INDENT 0.0
1413 .INDENT 3.5
1414 .sp
1415 .EX
1416 lock\-directory\-cleanup
1417 [ { \-h | \-\-help } ]
1418 .EE
1419 .UNINDENT
1420 .UNINDENT
1421 .SS Description
1422 .sp
1423 Automatically removes unused lock files from the \fBbarman_lock_directory\fP\&.
1424 .SS Parameters
1425 .INDENT 0.0
1426 .TP
1427 .B \fB\-h\fP / \fB\-\-help\fP
1428 Show a help message and exit. Provides information about command usage.
1429 .UNINDENT
1430 .SS \fBbarman put\-wal\fP
1431 .SS Synopsis
1432 .INDENT 0.0
1433 .INDENT 3.5
1434 .sp
1435 .EX
1436 put\-wal
1437 [ { \-h | \-\-help } ]
1438 [ { \-t | \-\-test } ]
1439 SERVER_NAME
1440 .EE
1441 .UNINDENT
1442 .UNINDENT
1443 .SS Description
1444 .sp
1445 Receive a WAL file from a remote server and securely save it into the server incoming
1446 directory. The WAL file should be provided via \fBSTDIN\fP, encapsulated in a tar stream
1447 along with a \fBSHA256SUMS\fP or \fBMD5SUMS\fP file for validation (\fBsha256\fP is the default
1448 hash algorithm, but the user can choose \fBmd5\fP when setting the \fBarchive\-command\fP via
1449 \fBbarman\-wal\-archive\fP). This command is intended to be executed via SSH from a remote
1450 \fBbarman\-wal\-archive\fP utility (included in the barman\-cli package). Avoid using this
1451 command directly unless you fully manage the content of the files.
1452 .SS Parameters
1453 .INDENT 0.0
1454 .TP
1455 .B \fBSERVER_NAME\fP
1456 Name of the server in barman node
1457 .TP
1458 .B \fB\-h\fP / \fB\-\-help\fP
1459 Show a help message and exit. Provides information about command usage.
1460 .TP
1461 .B \fB\-t\fP / \fB\-\-test\fP
1462 Test both the connection and configuration of the specified Postgres
1463 server in Barman for WAL retrieval.
1464 .UNINDENT
1465 .SS \fBbarman rebuild\-xlogdb\fP
1466 .SS Synopsis
1467 .INDENT 0.0
1468 .INDENT 3.5
1469 .sp
1470 .EX
1471 rebuild\-xlogdb
1472 [ { \-h | \-\-help } ]
1473 SERVER_NAME [ SERVER_NAME ... ]
1474 .EE
1475 .UNINDENT
1476 .UNINDENT
1477 .SS Description
1478 .sp
1479 Rebuild the WAL file metadata for a server (or for all servers using the \fBall\fP shortcut)
1480 based on the disk content. The WAL archive metadata is stored in the \fBxlog.db\fP file,
1481 with each Barman server maintaining its own copy.
1482 .SS Parameters
1483 .INDENT 0.0
1484 .TP
1485 .B \fBSERVER_NAME\fP
1486 Name of the server in barman node.
1487 .TP
1488 .B \fB\-h\fP / \fB\-\-help\fP
1489 Show a help message and exit. Provides information about command usage.
1490 .UNINDENT
1491 .SS Shortcuts
1492 .sp
1493 Use shortcuts instead of \fBSERVER_NAME\fP\&.
1494 .TS
1495 box center;
1496 l|l.
1497 T{
1498 \fBShortcut\fP
1499 T} T{
1500 \fBDescription\fP
1501 T}
1502 _
1503 T{
1504 \fBall\fP
1505 T} T{
1506 All available servers
1507 T}
1508 .TE
1509 .SS \fBbarman recover\fP
1510 .sp
1511 \fBNote:\fP
1512 .INDENT 0.0
1513 .INDENT 3.5
1514 This command is deprecated. Use the barman restore \%<#\:commands-barman-restore> command instead.
1515 .UNINDENT
1516 .UNINDENT
1517 .SS \fBbarman receive\-wal\fP
1518 .SS Synopsis
1519 .INDENT 0.0
1520 .INDENT 3.5
1521 .sp
1522 .EX
1523 receive\-wal
1524 [ \-\-create\-slot ]
1525 [ \-\-if\-not\-exists ]
1526 [ \-\-drop\-slot ]
1527 [ { \-h | \-\-help } ]
1528 [ \-\-reset ]
1529 [ \-\-stop ]
1530 SERVER_NAME
1531 .EE
1532 .UNINDENT
1533 .UNINDENT
1534 .SS Description
1535 .sp
1536 Initiate the streaming of transaction logs for a server. This process uses
1537 \fBpg_receivewal\fP or \fBpg_receivexlog\fP to receive WAL files from Postgres servers via
1538 the streaming protocol.
1539 .SS Parameters
1540 .INDENT 0.0
1541 .TP
1542 .B \fBSERVER_NAME\fP
1543 Name of the server in barman node.
1544 .TP
1545 .B \fB\-\-create\-slot\fP
1546 Create the physical replication slot configured with the \fBslot_name\fP configuration
1547 parameter.
1548 .TP
1549 .B \fB\-\-if\-not\-exists\fP
1550 Do not error out when \fB\-\-create\-slot\fP is specified and a slot with the specified name
1551 already exists.
1552 .TP
1553 .B \fB\-\-drop\-slot\fP
1554 Drop the physical replication slot configured with the \fBslot_name\fP configuration
1555 parameter.
1556 .TP
1557 .B \fB\-h\fP / \fB\-\-help\fP
1558 Show a help message and exit. Provides information about command usage.
1559 .TP
1560 .B \fB\-\-reset\fP
1561 Reset the status of \fBreceive\-wal\fP, restarting the streaming from the current WAL file
1562 of the server.
1563 .TP
1564 .B \fB\-\-stop\fP
1565 Stop the process for the server.
1566 .UNINDENT
1567 .sp
1568 \fBWarning:\fP
1569 .INDENT 0.0
1570 .INDENT 3.5
1571 The \fB\-\-stop\fP option for the \fBbarman receive\-wal\fP command will be obsoleted
1572 in a future release. Users should favor using the
1573 terminate\-process \%<#\:commands-barman-terminate-process> command instead, which
1574 is the new way of handling this feature.
1575 .UNINDENT
1576 .UNINDENT
1577 .SS \fBbarman restore\fP
1578 .SS Synopsis
1579 .INDENT 0.0
1580 .INDENT 3.5
1581 .sp
1582 .EX
1583 restore
1584 [ \-\-aws\-region AWS_REGION } ]
1585 [ \-\-azure\-resource\-group AZURE_RESOURCE_GRP ]
1586 [ \-\-bwlimit KBPS ]
1587 [ \-\-exclusive ]
1588 [ \-\-gcp\-zone GCP_ZONE ]
1589 [ { \-\-get\-wal | \-\-no\-get\-wal } ]
1590 [ { \-h | \-\-help } ]
1591 [ { \-j | \-\-jobs } PARALLEL_WORKERS ]
1592 [ \-\-jobs\-start\-batch\-period SECONDS ]
1593 [ \-\-jobs\-start\-batch\-size NUMBER ]
1594 [ \-\-local\-staging\-path PATH ]
1595 [ { \-\-network\-compression | \-\-no\-network\-compression } ]
1596 [ \-\-no\-retry ]
1597 [ \-\-partial\-wal ]
1598 [ \-\-recovery\-conf\-filename FILENAME ]
1599 [ \-\-recovery\-staging\-path PATH ]
1600 [ \-\-staging\-path STAGING_PATH ]
1601 [ \-\-staging\-location STAGING_LOCATION ]
1602 [ \-\-combine\-mode COMBINE_MODE ]
1603 [ \-\-remote\-ssh\-command STRING ]
1604 [ \-\-restore\-command COMMAND ]
1605 [ \-\-retry\-sleep SECONDS ]
1606 [ \-\-retry\-times NUMBER ]
1607 [ \-\-snapshot\-recovery\-instance INSTANCE_NAME ]
1608 [ \-\-snapshot\-recovery\-zone GCP_ZONE ]
1609 [ \-\-skip\-archive\-wal ]
1610 [ \-\-standby\-mode ]
1611 [ \-\-tablespace NAME:LOCATION [ \-\-tablespace NAME:LOCATION ... ] ]
1612 [ \-\-target\-action { pause | shutdown | promote } ]
1613 [ \-\-target\-immediate ]
1614 [ \-\-target\-lsn LSN ]
1615 [ \-\-target\-name RESTORE_POINT_NAME ]
1616 [ \-\-target\-time TIMESTAMP ]
1617 [ \-\-target\-tli TLI ]
1618 [ \-\-target\-xid XID ]
1619 [ \-\-staging\-wal\-directory ]
1620 SERVER_NAME BACKUP_ID DESTINATION_DIR
1621 .EE
1622 .UNINDENT
1623 .UNINDENT
1624 .SS Description
1625 .sp
1626 Execute a PostreSQL server restore operation. Barman will restore the backup from a
1627 server in the destination directory. The restoration can be performed locally (on the
1628 barman node itself) or remotely (on another machine accessible via SSH). The location is
1629 determined by whether or not the \fB\-\-remote\-ssh\-command\fP option is used. More
1630 information on this command can be found in the Recovery \%<#\:recovery> section. You can use a
1631 shortcut instead of \fBBACKUP_ID\fP\&.
1632 .SS Parameters
1633 .INDENT 0.0
1634 .TP
1635 .B \fBSERVER_NAME\fP
1636 Name of the server in barman node
1637 .TP
1638 .B \fBBACKUP_ID\fP
1639 Id of the backup in the barman catalog. Use \fBauto\fP to have Barman automatically
1640 find the most suitable backup for the restore operation.
1641 .TP
1642 .B \fBDESTINATION_DIR\fP
1643 Destination directory to restore the backup.
1644 .TP
1645 .B \fB\-\-aws\-region\fP
1646 Specify the AWS region where the instance and disks for snapshot recovery are
1647 located. This option allows you to override the \fBaws_region\fP value in the Barman
1648 configuration.
1649 .TP
1650 .B \fB\-\-azure\-resource\-group\fP
1651 Specify the Azure resource group containing the instance and disks for snapshot
1652 recovery. This option allows you to override the \fBazure_resource_group\fP value in
1653 the Barman configuration.
1654 .TP
1655 .B \fB\-\-bwlimit\fP
1656 Specify the maximum transfer rate in kilobytes per second. A value of \fB0\fP
1657 indicates no limit. This setting overrides the \fBbandwidth_limit\fP configuration
1658 option.
1659 .TP
1660 .B \fB\-\-delta\-restore\fP / \fB\-\-no\-delta\-restore\fP
1661 Enable/disable usage of \fBdelta\-restore\fP for a delta recovery. Default is based on
1662 \fBrecovery_options\fP setting.
1663 .TP
1664 .B \fB\-\-exclusive\fP
1665 Set target (time, XID or LSN) to be non inclusive.
1666 .TP
1667 .B \fB\-\-gcp\-zone\fP
1668 Specify the GCP zone where the instance and disks for snapshot recovery are located.
1669 This option allows you to override the \fBgcp_zone\fP value in the Barman
1670 configuration.
1671 .TP
1672 .B \fB\-\-get\-wal\fP / \fB\-\-no\-get\-wal\fP
1673 Enable/disable usage of \fBget\-wal\fP for WAL fetching during recovery. Default is based on
1674 \fBrecovery_options\fP setting.
1675 .sp
1676 \fBNote:\fP
1677 .INDENT 7.0
1678 .INDENT 3.5
1679 When \fBwals_directory\fP is configured to use cloud storage (e.g. S3, Azure,
1680 GCS), restores always require \fBget\-wal\fP for WAL fetching. If you specify
1681 \fB\-\-no\-get\-wal\fP or omit \fBget\-wal\fP from \fBrecovery_options\fP, Barman will
1682 automatically enable \fBget\-wal\fP for the restore operation and issue a
1683 warning.
1684 .UNINDENT
1685 .UNINDENT
1686 .TP
1687 .B \fB\-\-partial\-wal\fP
1688 Copy \fB\&.partial\fP WAL files to the recovery destination with the \fB\&.partial\fP
1689 suffix stripped. Barman considers two sources: \fB\&.partial\fP files in the
1690 \fBstreaming_wals_directory\fP (written by \fBpg_receivewal\fP) and \fB\&.partial\fP
1691 files in the main WAL archive (archived during standby promotion, possibly
1692 compressed or encrypted). Only applicable when using \fB\-\-no\-get\-wal\fP\&. When
1693 \fB\-\-get\-wal\fP is used, \fB\&.partial\fP files are already handled transparently and
1694 this option has no effect. The flag also has no effect when \fB\-\-target\-immediate\fP
1695 is used, since recovery stops at the first consistent state before any partial WAL
1696 would be needed. See Partial WAL files during recovery \%<#\:recovery-partial-wal-files> for details.
1697 .TP
1698 .B \fB\-h\fP / \fB\-\-help\fP
1699 Show a help message and exit. Provides information about command usage.
1700 .TP
1701 .B \fB\-j\fP / \fB\-\-jobs\fP
1702 Specify the number of parallel workers to use for copying files during the backup.
1703 This setting overrides the \fBparallel_jobs\fP parameter if it is specified in the
1704 configuration file.
1705 .TP
1706 .B \fB\-\-jobs\-start\-batch\-period\fP
1707 Specify the time period, in seconds, for starting a single batch of jobs. This value
1708 overrides the \fBparallel_jobs_start_batch_period\fP parameter if it is set in the
1709 configuration file. The default is \fB1\fP second.
1710 .TP
1711 .B \fB\-\-jobs\-start\-batch\-size\fP
1712 Specify the maximum number of parallel workers to initiate in a single batch. This
1713 value overrides the \fBparallel_jobs_start_batch_size\fP parameter if it is defined in
1714 the configuration file. The default is \fB10\fP workers.
1715 .TP
1716 .B \fB\-\-local\-staging\-path\fP
1717 Specify path on the Barman host where the chain of backups will be combined before
1718 being copied to the destination directory. The contents created within the staging
1719 path will be removed upon completion of the restore process. This option is
1720 necessary for restoring from block\-level incremental backups and has no effect
1721 otherwise.
1722 .sp
1723 Deprecated since version 3.15: \fB\-\-local\-staging\-path\fP is deprecated and will be removed in a future release.
1724 Use \fB\-\-staging\-path\fP and \fB\-\-staging\-location\fP instead.
1725
1726 .TP
1727 .B \fB\-\-network\-compression\fP / \fB\-\-no\-network\-compression\fP
1728 Enable/disable network compression during remote restore. Default is based on
1729 \fBnetwork_compression\fP configuration setting.
1730 .TP
1731 .B \fB\-\-no\-retry\fP
1732 There will be no retry in case of an error. It is the same as setting
1733 \fB\-\-retry\-times 0\fP\&.
1734 .TP
1735 .B \fB\-\-recovery\-conf\-filename\fP
1736 Specify the name of the file where Barman should write recovery options when
1737 recovering backups for Postgres versions 12 and later. By default, this is set to
1738 \fBpostgresql.auto.conf\fP\&. However, if \fB\-\-recovery\-conf\-filename\fP is specified,
1739 recovery options will be written to the specified value instead. While the default
1740 value is suitable for most Postgres installations, this option allows you to specify
1741 an alternative location if Postgres is managed by tools that alter the configuration
1742 mechanism (for example, if \fBpostgresql.auto.conf\fP is symlinked to \fB/dev/null\fP).
1743 .TP
1744 .B \fB\-\-recovery\-staging\-path\fP
1745 Specify a path on the recovery host where files for a compressed backup will be
1746 staged before being decompressed to the destination directory. Backups will be
1747 staged in their own directory within the staging path, following the naming
1748 convention: \fBbarman\-staging\-SERVER_NAME\-BACKUP_ID\fP\&. This staging directory will be
1749 removed after the restore process is complete. This option is mandatory for
1750 restoring from compressed backups and has no effect otherwise.
1751 .sp
1752 Deprecated since version 3.15: \fB\-\-recovery\-staging\-path\fP is deprecated and will be removed in a future release.
1753 Use \fB\-\-staging\-path\fP and \fB\-\-staging\-location\fP instead.
1754
1755 .TP
1756 .B \fB\-\-staging\-path\fP
1757 A path where intermediate files are staged during restore. When restoring a
1758 compressed backup, it serves as a temporary location for decompression before
1759 copying to the final destination. When restoring an incremental backup, it is where
1760 backups are combined before copying to the final destination. This location must
1761 have enough space to store the decompressed/combined backup.
1762 .TP
1763 .B \fB\-\-staging\-location\fP
1764 Specifies whether \fB\-\-staging\-path\fP is a local or remote path. Valid values are
1765 \fBlocal\fP and \fBremote\fP\&.
1766 .TP
1767 .B \fB\-\-combine\-mode\fP
1768 Specifies a copy mode for \fBpg_combinebackup\fP when combining incremental backups
1769 during a restore.
1770 .sp
1771 Options include:
1772 .INDENT 7.0
1773 .IP \(bu 2
1774 \fBcopy\fP (default): Use standard file copying when combining incremental backups.
1775 .IP \(bu 2
1776 \fBlink\fP: Use hard links when combining incremental backups. Reconstruction of the
1777 synthetic backup might be faster (no file copying) and use less disk space.
1778 .IP \(bu 2
1779 \fBclone\fP: Use efficient file cloning (also known as “reflinks” on some systems)
1780 instead of copying files to the new data directory, which can result in
1781 near\-instantaneous copying of the data files.
1782 .IP \(bu 2
1783 \fBcopy\-file\-range\fP: Use the \fBcopy_file_range\fP system call for efficient copying.
1784 On some file systems this gives results similar to \fBclone\fP, sharing physical disk
1785 blocks, while on others it may still copy blocks, but do so via an optimized path.
1786 .UNINDENT
1787 .sp
1788 Refer to the pg_combinebackup documentation \%<https://\:www\:.postgresql\:.org/\:docs/\:current/\:app-pgcombinebackup\:.html>
1789 for more details and restrictions of each mode.
1790 .TP
1791 .B \fB\-\-remote\-ssh\-command\fP
1792 This option enables remote restore by specifying the secure shell command to
1793 execute on a remote host. It functions similarly to the \fBssh_command\fP server
1794 option in the configuration file for remote restore, that is, \fB\(aqssh USER@SERVER\(aq\fP\&.
1795 .TP
1796 .B \fB\-\-restore\-command\fP
1797 Specify a custom restore command to override Barman\(aqs default restore_command in
1798 the PostgreSQL recovery configuration. While the default restore_command built by
1799 Barman is suitable for most cases, this option allows you to specify an alternative
1800 command if your setup requires it. Can be used only when running a restore with
1801 \fBget\-wal\fP mode.
1802 .TP
1803 .B \fB\-\-retry\-sleep\fP
1804 Specify the number of seconds to wait after a failed copy before retrying. This
1805 setting applies to both backup and restore operations and overrides the
1806 \fBbasebackup_retry_sleep\fP parameter if it is defined in the configuration file.
1807 .TP
1808 .B \fB\-\-retry\-times\fP
1809 Specify the number of times to retry the base backup copy in case of an error. This
1810 applies to both backup and restore operations and overrides the
1811 \fBbasebackup_retry_times\fP parameter if it is set in the configuration file.
1812 .TP
1813 .B \fB\-\-snapshot\-recovery\-instance\fP
1814 Specify the name of the instance where the disks recovered from the snapshots are
1815 attached. This option is necessary when recovering backups created with
1816 \fBbackup_method=snapshot\fP\&.
1817 .TP
1818 .B \fB\-\-snapshot\-recovery\-zone\fP (deprecated)
1819 Zone containing the instance and disks for the snapshot recovery (deprecated:
1820 replaced by \fB\-\-gcp\-zone\fP)
1821 .TP
1822 .B \fB\-\-standby\-mode\fP
1823 Whether to start the Postgres server as a standby.
1824 .TP
1825 .B \fB\-\-tablespace\fP
1826 Specify tablespace relocation rule. \fBNAME\fP is the tablespace name and \fBLOCATION\fP
1827 is the recovery host destination path to restore the tablespace.
1828 .TP
1829 .B \fB\-\-target\-action\fP
1830 Trigger the specified action when the recovery target is reached. This option
1831 requires defining a target along with one of these actions. The possible values are:
1832 .INDENT 7.0
1833 .IP \(bu 2
1834 \fBpause\fP: Once recovery target is reached, the server is started in pause state,
1835 allowing users to inspect the instance
1836 .IP \(bu 2
1837 \fBpromote\fP: Once recovery target is reached, the server will exit the recovery
1838 operation and is promoted as a master.
1839 .IP \(bu 2
1840 \fBshutdown\fP: Once recovery target is reached, the server is shut down.
1841 .UNINDENT
1842 .TP
1843 .B \fB\-\-target\-immediate\fP
1844 Recovery is completed when a consistent state is reached (end of the base backup).
1845 .TP
1846 .B \fB\-\-target\-lsn\fP
1847 Recover to the specified LSN (Log Sequence Number). Requires Postgres 10 or above.
1848 .TP
1849 .B \fB\-\-target\-name\fP
1850 Recover to the specified name of a restore point previously created with the
1851 \fBpg_create_restore_point(name)\fP\&.
1852 .TP
1853 .B \fB\-\-target\-time\fP
1854 Recover to the specified time. Use the format \fBYYYY\-MM\-DD HH:MM:SS.mmm\fP\&.
1855 .TP
1856 .B \fB\-\-target\-tli\fP
1857 Recover the specified timeline. You can use the special values \fBcurrent\fP and
1858 \fBlatest\fP in addition to a numeric timeline ID. For Postgres versions 12 and above,
1859 the default is to recover to the latest timeline in the WAL archive. For Postgres
1860 versions below 12, the default is to recover to the timeline that was current at the
1861 time the backup was taken.
1862 .TP
1863 .B \fB\-\-target\-xid\fP
1864 Recover to the specified transaction ID.
1865 .UNINDENT
1866 .INDENT 0.0
1867 .TP
1868 .B \fB\-\-skip\-archive\-wal\fP
1869 Skip archiving staged WAL files before starting the restore. By default, \fBbarman
1870 restore\fP archives any WAL files in the server\(aqs \fBincoming\fP/ \fBstreaming\fP
1871 directory before restoring to reduce RPO in DR scenarios. Use this option when you
1872 want to skip this step.
1873 .TP
1874 .B \fB\-\-staging\-wal\-directory\fP
1875 A staging directory on the destination host for WAL files when performing PITR. If
1876 unspecified, it uses a \fBbarman_wal\fP directory inside the destination directory.
1877 .UNINDENT
1878 .SS Shortcuts
1879 .sp
1880 Use shortcuts instead of \fBBACKUP_ID\fP\&.
1881 .TS
1882 box center;
1883 l|l.
1884 T{
1885 \fBShortcut\fP
1886 T} T{
1887 \fBDescription\fP
1888 T}
1889 _
1890 T{
1891 \fBfirst/oldest\fP
1892 T} T{
1893 Oldest available backup for the server, in chronological order.
1894 T}
1895 _
1896 T{
1897 \fBlast/latest\fP
1898 T} T{
1899 Most recent available backup for the server, in chronological order.
1900 T}
1901 _
1902 T{
1903 \fBlast\-full/latest\-full\fP
1904 T} T{
1905 Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&.
1906 T}
1907 _
1908 T{
1909 \fBlast\-failed\fP
1910 T} T{
1911 Most recent backup that failed, in chronological order.
1912 T}
1913 .TE
1914 .SS \fBbarman replication\-status\fP
1915 .SS Synopsis
1916 .INDENT 0.0
1917 .INDENT 3.5
1918 .sp
1919 .EX
1920 replication\-status
1921 [ { \-h | \-\-help } ]
1922 [ \-\-minimal ]
1923 [ \-\-source { backup\-host | wal\-host } ]
1924 [ \-\-target { hot\-standby | wal\-streamer | all } ]
1925 SERVER_NAME [ SERVER_NAME ... ]
1926 .EE
1927 .UNINDENT
1928 .UNINDENT
1929 .SS Description
1930 .sp
1931 Display real\-time information and status of any streaming clients connected to the
1932 specified server. Specify \fBall\fP shortcut to display information for all configured
1933 servers.
1934 .SS Parameters
1935 .INDENT 0.0
1936 .TP
1937 .B \fBSERVER_NAME\fP
1938 Name of the server in barman node
1939 .TP
1940 .B \fB\-h\fP / \fB\-\-help\fP
1941 Show a help message and exit. Provides information about command usage.
1942 .TP
1943 .B \fB\-\-minimal\fP
1944 Machine readable output.
1945 .TP
1946 .B \fB\-\-source\fP
1947 The possible values are:
1948 .INDENT 7.0
1949 .IP \(bu 2
1950 \fBbackup\-host\fP (default): List clients using the backup connection information
1951 for a server.
1952 .IP \(bu 2
1953 \fBwal\-host\fP: List clients using the WAL streaming connection information for a
1954 server.
1955 .UNINDENT
1956 .TP
1957 .B \fB\-\-target\fP
1958 The possible values are:
1959 .INDENT 7.0
1960 .IP \(bu 2
1961 \fBhot\-standby\fP: List only hot standby servers.
1962 .IP \(bu 2
1963 \fBwal\-streamer\fP: List only WAL streaming clients, such as \fBpg_receivewal\fP\&.
1964 .IP \(bu 2
1965 \fBall\fP (default): List all streaming clients.
1966 .UNINDENT
1967 .UNINDENT
1968 .SS Shortcuts
1969 .sp
1970 Use shortcuts instead of \fBSERVER_NAME\fP\&.
1971 .TS
1972 box center;
1973 l|l.
1974 T{
1975 \fBShortcut\fP
1976 T} T{
1977 \fBDescription\fP
1978 T}
1979 _
1980 T{
1981 \fBall\fP
1982 T} T{
1983 All available servers
1984 T}
1985 .TE
1986 .SS \fBbarman show\-backup\fP
1987 .SS Synopsis
1988 .INDENT 0.0
1989 .INDENT 3.5
1990 .sp
1991 .EX
1992 show\-backup
1993 [ { \-h | \-\-help } ]
1994 SERVER_NAME BACKUP_ID
1995 .EE
1996 .UNINDENT
1997 .UNINDENT
1998 .SS Description
1999 .sp
2000 Display detailed information about a specific backup. You can find details about this command in
2001 Catalog usage \%<#\:catalog-usage-show-backup>\&. You can use a shortcut instead of \fBBACKUP_ID\fP\&.
2002 .SS Parameters
2003 .INDENT 0.0
2004 .TP
2005 .B \fBSERVER_NAME\fP
2006 Name of the server in barman node
2007 .TP
2008 .B \fBBACKUP_ID\fP
2009 Id of the backup in barman catalog.
2010 .TP
2011 .B \fB\-h\fP / \fB\-\-help\fP
2012 Show a help message and exit. Provides information about command usage.
2013 .UNINDENT
2014 .SS Shortcuts
2015 .sp
2016 Use shortcuts instead of \fBBACKUP_ID\fP\&.
2017 .TS
2018 box center;
2019 l|l.
2020 T{
2021 \fBShortcut\fP
2022 T} T{
2023 \fBDescription\fP
2024 T}
2025 _
2026 T{
2027 \fBfirst/oldest\fP
2028 T} T{
2029 Oldest available backup for the server, in chronological order.
2030 T}
2031 _
2032 T{
2033 \fBlast/latest\fP
2034 T} T{
2035 Most recent available backup for the server, in chronological order.
2036 T}
2037 _
2038 T{
2039 \fBlast\-full/latest\-full\fP
2040 T} T{
2041 Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&.
2042 T}
2043 _
2044 T{
2045 \fBlast\-failed\fP
2046 T} T{
2047 Most recent backup that failed, in chronological order.
2048 T}
2049 .TE
2050 .SS \fBbarman show\-servers\fP
2051 .SS Synopsis
2052 .INDENT 0.0
2053 .INDENT 3.5
2054 .sp
2055 .EX
2056 show\-servers
2057 [ { \-h | \-\-help } ]
2058 SERVER_NAME [ SERVER_NAME ... ]
2059 .EE
2060 .UNINDENT
2061 .UNINDENT
2062 .SS Description
2063 .sp
2064 Display detailed information about a server, including \fBconninfo\fP, \fBbackup_directory\fP,
2065 \fBwals_directory\fP, \fBarchive_command\fP, and many more. To view information about all configured
2066 servers, specify the \fBall\fP shortcut instead of the server name.
2067 .SS Parameters
2068 .INDENT 0.0
2069 .TP
2070 .B \fBSERVER_NAME\fP
2071 Name of the server in barman node
2072 .TP
2073 .B \fB\-h\fP / \fB\-\-help\fP
2074 Show a help message and exit. Provides information about command usage.
2075 .UNINDENT
2076 .SS Shortcuts
2077 .TS
2078 box center;
2079 l|l.
2080 T{
2081 \fBShortcut\fP
2082 T} T{
2083 \fBDescription\fP
2084 T}
2085 _
2086 T{
2087 \fBall\fP
2088 T} T{
2089 All available servers
2090 T}
2091 .TE
2092 .SS \fBbarman status\fP
2093 .SS Synopsis
2094 .INDENT 0.0
2095 .INDENT 3.5
2096 .sp
2097 .EX
2098 status
2099 [ { \-h | \-\-help } ]
2100 SERVER_NAME [ SERVER_NAME ... ]
2101 .EE
2102 .UNINDENT
2103 .UNINDENT
2104 .SS Description
2105 .sp
2106 Display information about a server\(aqs status, including details such as the state,
2107 Postgres version, WAL information, available backups and more.
2108 .SS Parameters
2109 .INDENT 0.0
2110 .TP
2111 .B \fBSERVER_NAME\fP
2112 Name of the server in barman node
2113 .TP
2114 .B \fB\-h\fP / \fB\-\-help\fP
2115 Show a help message and exit. Provides information about command usage.
2116 .UNINDENT
2117 .SS Shortcuts
2118 .TS
2119 box center;
2120 l|l.
2121 T{
2122 \fBShortcut\fP
2123 T} T{
2124 \fBDescription\fP
2125 T}
2126 _
2127 T{
2128 \fBall\fP
2129 T} T{
2130 All available servers
2131 T}
2132 .TE
2133 .SS \fBbarman switch\-wal\fP
2134 .SS Synopsis
2135 .INDENT 0.0
2136 .INDENT 3.5
2137 .sp
2138 .EX
2139 switch\-wal
2140 [ \-\-archive ]
2141 [ \-\-archive\-timeout ]
2142 [ \-\-force ]
2143 [ { \-h | \-\-help } ]
2144 SERVER_NAME [ SERVER_NAME ... ]
2145 .EE
2146 .UNINDENT
2147 .UNINDENT
2148 .SS Description
2149 .sp
2150 Execute \fBpg_switch_wal()\fP on the target server (Postgres versions 10 and later) or
2151 \fBpg_switch_xlog()\fP (for Postgres versions 8.3 to 9.6).
2152 .SS Parameters
2153 .INDENT 0.0
2154 .TP
2155 .B \fBSERVER_NAME\fP
2156 Name of the server in barman node
2157 .TP
2158 .B \fB\-\-archive\fP
2159 Waits for one WAL file to be archived. If no WAL file is archived within a specified
2160 time (default: \fB30\fP seconds), Barman will terminate with a failure exit code. This
2161 option is also available on standby servers.
2162 .TP
2163 .B \fB\-\-archive\-timeout\fP
2164 Specify the amount of time in seconds (default: \fB30\fP seconds) that the archiver
2165 will wait for a new WAL file to be archived before timing out. This option is also
2166 available on standby servers.
2167 .TP
2168 .B \fB\-\-force\fP
2169 Forces the switch by executing a CHECKPOINT before \fBpg_switch_wal()\fP\&.
2170 .sp
2171 \fBNote:\fP
2172 .INDENT 7.0
2173 .INDENT 3.5
2174 Running a CHECKPOINT may increase I/O load on the Postgres server, so use this
2175 option cautiously.
2176 .UNINDENT
2177 .UNINDENT
2178 .TP
2179 .B \fB\-h\fP / \fB\-\-help\fP
2180 Show a help message and exit. Provides information about command usage.
2181 .UNINDENT
2182 .SS \fBbarman switch\-xlog\fP
2183 .SS Description
2184 .sp
2185 Alias for the \fBswitch\-wal\fP command.
2186 .SS \fBbarman sync\-backup\fP
2187 .SS Synopsis
2188 .INDENT 0.0
2189 .INDENT 3.5
2190 .sp
2191 .EX
2192 sync\-backup
2193 [ { \-h | \-\-help } ]
2194 SERVER_NAME BACKUP_ID
2195 .EE
2196 .UNINDENT
2197 .UNINDENT
2198 .SS Description
2199 .sp
2200 This command synchronizes a passive node with its primary by copying all files from a
2201 backup present on the server node. It is available only for passive nodes and uses
2202 the \fBprimary_ssh_command\fP option to establish a secure connection with the primary
2203 node. You can use a shortcut instead of \fBBACKUP_ID\fP\&.
2204 .SS Parameters
2205 .INDENT 0.0
2206 .TP
2207 .B \fBSERVER_NAME\fP
2208 Name of the server in barman node
2209 .TP
2210 .B \fBBACKUP_ID\fP
2211 Id of the backup in barman catalog.
2212 .TP
2213 .B \fB\-h\fP / \fB\-\-help\fP
2214 Show a help message and exit. Provides information about command usage.
2215 .UNINDENT
2216 .SS Shortcuts
2217 .sp
2218 For some commands, instead of using the timestamp backup ID, you can use the following
2219 shortcuts or aliases to identify a backup for a given server:
2220 .TS
2221 box center;
2222 l|l.
2223 T{
2224 \fBShortcut\fP
2225 T} T{
2226 \fBDescription\fP
2227 T}
2228 _
2229 T{
2230 \fBfirst/oldest\fP
2231 T} T{
2232 Oldest available backup for the server, in chronological order.
2233 T}
2234 _
2235 T{
2236 \fBlast/latest\fP
2237 T} T{
2238 Most recent available backup for the server, in chronological order.
2239 T}
2240 _
2241 T{
2242 \fBlast\-full/latest\-full\fP
2243 T} T{
2244 Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&.
2245 T}
2246 _
2247 T{
2248 \fBlast\-failed\fP
2249 T} T{
2250 Most recent backup that failed, in chronological order.
2251 T}
2252 .TE
2253 .SS \fBbarman sync\-info\fP
2254 .SS Synopsis
2255 .INDENT 0.0
2256 .INDENT 3.5
2257 .sp
2258 .EX
2259 sync\-info
2260 [ { \-h | \-\-help } ]
2261 [ \-\-primary ]
2262 SERVER_NAME [ LAST_WAL [ LAST_POS ] ]
2263 .EE
2264 .UNINDENT
2265 .UNINDENT
2266 .SS Description
2267 .sp
2268 Gather information about the current status of a Barman server for synchronization
2269 purposes.
2270 .sp
2271 This command returns a JSON output for a server that includes: all successfully
2272 completed backups, all archived WAL files, the configuration, the last WAL file read from
2273 \fBxlog.db\fP, and its position within the file.
2274 .SS Parameters
2275 .INDENT 0.0
2276 .TP
2277 .B \fBSERVER_NAME\fP
2278 Name of the server in barman node
2279 .TP
2280 .B \fBLAST_WAL\fP
2281 Instructs sync\-info to skip any WAL files that precede the specified file (for
2282 incremental synchronization).
2283 .TP
2284 .B \fBLAST_POS\fP
2285 Hint for quickly positioning in the \fBxlog.db\fP file (for incremental synchronization).
2286 .TP
2287 .B \fB\-h\fP / \fB\-\-help\fP
2288 Show a help message and exit. Provides information about command usage.
2289 .TP
2290 .B \fB\-\-primary\fP
2291 Execute the sync\-info on the primary node (if set).
2292 .UNINDENT
2293 .SS \fBbarman sync\-wals\fP
2294 .SS Synopsis
2295 .INDENT 0.0
2296 .INDENT 3.5
2297 .sp
2298 .EX
2299 sync\-wals
2300 [ { \-h | \-\-help } ]
2301 SERVER_NAME
2302 .EE
2303 .UNINDENT
2304 .UNINDENT
2305 .SS Description
2306 .sp
2307 This command synchronizes a passive node with its primary by copying all archived WAL
2308 files from the server node. It is available only for passive nodes and utilizes the
2309 \fBprimary_ssh_command\fP option to establish a secure connection with the primary node.
2310 .SS Parameters
2311 .INDENT 0.0
2312 .TP
2313 .B \fBSERVER_NAME\fP
2314 Name of the server in barman node
2315 .TP
2316 .B \fB\-h\fP / \fB\-\-help\fP
2317 Show a help message and exit. Provides information about command usage.
2318 .UNINDENT
2319 .SS \fBbarman terminate\-process\fP
2320 .SS Synopsis
2321 .INDENT 0.0
2322 .INDENT 3.5
2323 .sp
2324 .EX
2325 terminate\-process SERVER_NAME TASK_NAME
2326 .EE
2327 .UNINDENT
2328 .UNINDENT
2329 .SS Description
2330 .sp
2331 The \fBbarman terminate\-process\fP command terminates an active Barman subprocess on a
2332 specified server. The target process is identified by its task name (for example, \fBbackup\fP
2333 or \fBreceive\-wal\fP). Note that only processes that are running on the server level can be
2334 terminated, so global processes like \fBcron\fP or \fBconfig\-update\fP can not be terminated
2335 by this command.
2336 .sp
2337 You can also use the output of \fBbarman list\-processes\fP to display all active processes
2338 for a given server and determine which tasks can be terminated. More details about this
2339 command can be found in barman list\-processes \%<#\:commands-barman-list-processes>\&.
2340 .SS Parameters
2341 .INDENT 0.0
2342 .TP
2343 .B \fBSERVER_NAME\fP
2344 The name of the server where the subprocess is running.
2345 .TP
2346 .B \fBTASK_NAME\fP
2347 The task name that identifies the subprocess to be terminated.
2348 .UNINDENT
2349 .SS \fBbarman verify\-backup\fP
2350 .SS Synopsis
2351 .INDENT 0.0
2352 .INDENT 3.5
2353 .sp
2354 .EX
2355 verify\-backup
2356 [ { \-h | \-\-help } ]
2357 SERVER_NAME BACKUP_ID
2358 .EE
2359 .UNINDENT
2360 .UNINDENT
2361 .SS Description
2362 .sp
2363 Runs \fBpg_verifybackup\fP on a backup manifest file (available since Postgres version 13).
2364 For rsync backups, it can be used after creating a manifest file using the
2365 \fBgenerate\-manifest\fP command. Requires \fBpg_verifybackup\fP to be installed on the
2366 backup server. You can use a shortcut instead of \fBBACKUP_ID\fP\&.
2367 .sp
2368 Starting with Postgres 18, tar\-format backups taken with the \fBpostgres\fP backup
2369 method can also be verified, including those compressed with \fBgzip\fP, \fBlz4\fP or
2370 \fBzstd\fP\&. Verifying tar or compressed backups requires \fBpg_verifybackup\fP from
2371 Postgres 18 or newer to be available on the backup server, otherwise the command
2372 will fail with an error. Encrypted backups are not supported by this command.
2373 .SS Parameters
2374 .INDENT 0.0
2375 .TP
2376 .B \fBSERVER_NAME\fP
2377 Name of the server in barman node
2378 .TP
2379 .B \fBBACKUP_ID\fP
2380 Id of the backup in barman catalog.
2381 .TP
2382 .B \fB\-h\fP / \fB\-\-help\fP
2383 Show a help message and exit. Provides information about command usage.
2384 .UNINDENT
2385 .SS Shortcuts
2386 .sp
2387 For some commands, instead of using the timestamp backup ID, you can use the following
2388 shortcuts or aliases to identify a backup for a given server:
2389 .TS
2390 box center;
2391 l|l.
2392 T{
2393 \fBShortcut\fP
2394 T} T{
2395 \fBDescription\fP
2396 T}
2397 _
2398 T{
2399 \fBfirst/oldest\fP
2400 T} T{
2401 Oldest available backup for the server, in chronological order.
2402 T}
2403 _
2404 T{
2405 \fBlast/latest\fP
2406 T} T{
2407 Most recent available backup for the server, in chronological order.
2408 T}
2409 _
2410 T{
2411 \fBlast\-full/latest\-full\fP
2412 T} T{
2413 Most recent full backup taken with methods \fBrsync\fP or \fBpostgres\fP\&.
2414 T}
2415 _
2416 T{
2417 \fBlast\-failed\fP
2418 T} T{
2419 Most recent backup that failed, in chronological order.
2420 T}
2421 .TE
2422 .SS \fBbarman verify\fP
2423 .SS Description
2424 .sp
2425 Alias for \fBverify\-backup\fP command.
2426 .SH BARMAN-CLI COMMANDS
2427 .sp
2428 The \fBbarman\-cli\fP package includes a collection of recommended client utilities that
2429 should be installed alongside the Postgres server. Here are the command references for
2430 both utilities.
2431 .SS \fBbarman\-wal\-archive\fP
2432 .SS Synopsis
2433 .INDENT 0.0
2434 .INDENT 3.5
2435 .sp
2436 .EX
2437 barman\-wal\-archive
2438 [ { \-h | \-\-help } ]
2439 [ { \-V | \-\-version } ]
2440 [ { \-U | \-\-user } USER ]
2441 [ \-\-port PORT ]
2442 [ { { \-z | \-\-gzip } | { \-j | \-\-bzip2 } | \-\-xz | \-\-snappy | \-\-zstd | \-\-lz4 } ]
2443 [ \-\-compression\-level COMPRESSION_LEVEL ]
2444 [ { \-c | \-\-config } CONFIG ]
2445 [ { \-t | \-\-test } ]
2446 [ \-\-md5 ]
2447 [ { \-p | \-\-parallel } JOBS ]
2448 [ \-\-prefetch\-cache\-dir PREFETCH_CACHE_DIR ]
2449 BARMAN_HOST SERVER_NAME WAL_PATH
2450 .EE
2451 .UNINDENT
2452 .UNINDENT
2453 .SS Description
2454 .sp
2455 This script can be utilized in the \fBarchive_command\fP of a Postgres server to
2456 transfer WAL files to a Barman host using the \fBput\-wal\fP command (introduced in Barman
2457 2.6). It establishes an SSH connection to the Barman host, enabling seamless integration
2458 of Barman within Postgres clusters for improved business continuity.
2459 .sp
2460 \fBExit Statuses\fP are:
2461 .INDENT 0.0
2462 .IP \(bu 2
2463 \fB0\fP for \fBSUCCESS\fP\&.
2464 .IP \(bu 2
2465 \fBnon\-zero\fP for \fBFAILURE\fP\&.
2466 .UNINDENT
2467 .SS Parameters
2468 .INDENT 0.0
2469 .TP
2470 .B \fBSERVER_NAME\fP
2471 The server name configured in Barman for the Postgres server from which
2472 the WAL file is retrieved.
2473 .TP
2474 .B \fBBARMAN_HOST\fP
2475 The host of the Barman server.
2476 .TP
2477 .B \fBWAL_PATH\fP
2478 The value of the \(aq%p\(aq keyword (according to \fBarchive_command\fP).
2479 .TP
2480 .B \fB\-h\fP / \fB\-\-help\fP
2481 Display a help message and exit.
2482 .TP
2483 .B \fB\-V\fP / \fB\-\-version\fP
2484 Display the program\(aqs version number and exit.
2485 .TP
2486 .B \fB\-U\fP / \fB\-\-user\fP
2487 Specify the user for the SSH connection to the Barman server (defaults to
2488 \fBbarman\fP).
2489 .TP
2490 .B \fB\-\-port\fP
2491 Define the port used for the SSH connection to the Barman server.
2492 .TP
2493 .B \fB\-z\fP / \fB\-\-gzip\fP
2494 gzip\-compress the WAL file before sending it to the Barman server.
2495 .TP
2496 .B \fB\-j\fP / \fB\-\-bzip2\fP
2497 bzip2\-compress the WAL file before sending it to the Barman server.
2498 .TP
2499 .B \fB\-\-xz\fP
2500 xz\-compress the WAL file before sending it to the Barman server.
2501 .TP
2502 .B \fB\-\-snappy\fP
2503 snappy\-compress the WAL file before sending it to the Barman server (requires the
2504 \fBpython\-snappy\fP Python library to be installed).
2505 .TP
2506 .B \fB\-\-zstd\fP
2507 zstd\-compress the WAL file before sending it to the Barman server (requires the
2508 \fBzstandard\fP Python library to be installed).
2509 .TP
2510 .B \fB\-\-lz4\fP
2511 lz4\-compress the WAL file before sending it to the Barman server (requires the
2512 \fBlz4\fP Python library to be installed).
2513 .TP
2514 .B \fB\-\-compression\-level\fP
2515 A compression level to be used by the selected compression algorithm. Valid
2516 values are integers within the supported range of the chosen algorithm or one
2517 of the predefined labels: \fBlow\fP, \fBmedium\fP, and \fBhigh\fP\&. The range of each
2518 algorithm as well as what level each predefined label maps to can be found in
2519 compression_level \%<#\:configuration-options-compression-level>\&.
2520 .TP
2521 .B \fB\-c\fP / \fB\-\-config\fP
2522 Specify the configuration file on the Barman server.
2523 .TP
2524 .B \fB\-t\fP / \fB\-\-test\fP
2525 Test the connection and configuration of the specified Postgres server in Barman to
2526 ensure it is ready to receive WAL files. This option ignores the mandatory argument
2527 \fBWAL_PATH\fP\&.
2528 .TP
2529 .B \fB\-\-md5\fP
2530 Use MD5 instead of SHA256 as the hash algorithm to calculate the checksum of the WAL
2531 file when transmitting it to the Barman server. This is used to maintain
2532 compatibility with older server versions, as older versions of Barman server used to
2533 support only MD5.
2534 .TP
2535 .B \fB\-p\fP / \fB\-\-parallel\fP
2536 Specify the maximum number of WAL files to archive in parallel. Defaults to \fB0\fP
2537 (no parallelism).
2538 .TP
2539 .B \fB\-\-prefetch\-cache\-dir\fP
2540 Directory where to store cache metadata when using \fB\-\-parallel\fP\&. Defaults to
2541 \fB/tmp/barman\-SERVER_NAME\-COMPUTED_HASH\fP\&.
2542 .UNINDENT
2543 .sp
2544 \fBNote:\fP
2545 .INDENT 0.0
2546 .INDENT 3.5
2547 When compression is enabled in \fBbarman\-wal\-archive\fP, it takes precedence over the
2548 compression settings configured on the Barman server, if they differ.
2549 .UNINDENT
2550 .UNINDENT
2551 .sp
2552 \fBImportant:\fP
2553 .INDENT 0.0
2554 .INDENT 3.5
2555 When compression is enabled in \fBbarman\-wal\-archive\fP, it is performed on the client
2556 side, before the file is sent to Barman. Be mindful of the database server\(aqs load and
2557 the chosen compression algorithm and level, as higher compression can delay WAL
2558 shipping, causing WAL files to accumulate.
2559 .UNINDENT
2560 .UNINDENT
2561 .SS \fBbarman\-wal\-restore\fP
2562 .SS Synopsis
2563 .INDENT 0.0
2564 .INDENT 3.5
2565 .sp
2566 .EX
2567 barman\-wal\-restore
2568 [ { \-h | \-\-help } ]
2569 [ { \-V | \-\-version } ]
2570 [ { \-U | \-\-user } USER ]
2571 [ \-\-port PORT ]
2572 [ { \-s | \-\-sleep } SECONDS ]
2573 [ { \-p | \-\-parallel } JOBS ]
2574 [ \-\-spool\-dir SPOOL_DIR ]
2575 [ { \-P | \-\-partial } ]
2576 [ { { \-z | \-\-gzip } | { \-j | \-\-bzip2 } | \-\-keep\-compression } ]
2577 [ { \-c | \-\-config } CONFIG ]
2578 [ { \-t | \-\-test } ]
2579 BARMAN_HOST SERVER_NAME WAL_NAME WAL_DEST
2580 .EE
2581 .UNINDENT
2582 .UNINDENT
2583 .SS Description
2584 .sp
2585 This script serves as a \fBrestore_command\fP for Postgres servers, enabling the
2586 retrieval of WAL files through Barman\(aqs \fBget\-wal\fP feature. It establishes an SSH
2587 connection to the Barman host and facilitates the integration of Barman within
2588 Postgres clusters, enhancing business continuity.
2589 .sp
2590 \fBExit Statuses\fP are:
2591 .INDENT 0.0
2592 .IP \(bu 2
2593 \fB0\fP for \fBSUCCESS\fP\&.
2594 .IP \(bu 2
2595 \fB1\fP for remote get\-wal command \fBFAILURE\fP, likely because the requested WAL could
2596 not be found.
2597 .IP \(bu 2
2598 \fB2\fP for ssh connection \fBFAILURE\fP\&.
2599 .IP \(bu 2
2600 Any other \fBnon\-zero\fP for \fBFAILURE\fP\&.
2601 .UNINDENT
2602 .SS Parameters
2603 .INDENT 0.0
2604 .TP
2605 .B \fBSERVER_NAME\fP
2606 The server name configured in Barman for the Postgres server from which the
2607 WAL file is retrieved.
2608 .TP
2609 .B \fBBARMAN_HOST\fP
2610 The host of the Barman server.
2611 .TP
2612 .B \fBWAL_NAME\fP
2613 The value of the \(aq%f\(aq keyword (according to \fBrestore_command\fP).
2614 .TP
2615 .B \fBWAL_DEST\fP
2616 The value of the \(aq%p\(aq keyword (according to \fBrestore_command\fP).
2617 .TP
2618 .B \fB\-h\fP / \fB\-\-help\fP
2619 Display a help message and exit.
2620 .TP
2621 .B \fB\-V\fP / \fB\-\-version\fP
2622 Display the program\(aqs version number and exit.
2623 .TP
2624 .B \fB\-U\fP / \fB\-\-user\fP
2625 Specify the user for the SSH connection to the Barman server (defaults to
2626 \fBbarman\fP).
2627 .TP
2628 .B \fB\-\-port\fP
2629 Define the port used for the SSH connection to the Barman server.
2630 .TP
2631 .B \fB\-s\fP / \fB\-\-sleep\fP
2632 Pause for \fBSECONDS\fP after a failed \fBget\-wal\fP request (defaults to \fB0\fP \- no
2633 wait).
2634 .TP
2635 .B \fB\-p\fP / \fB\-\-parallel\fP
2636 Specifies the number of WAL files to fetch in parallel. Default is \fB0\fP (disabled).
2637 When set to a value greater than \fB1\fP, fetches the requested WAL file along with the
2638 next \fBN \- 1\fP files simultaneously. The additional files are staged in a local spool
2639 directory (see \fB\-\-spool\-dir\fP) so that subsequent restore requests can be served
2640 immediately from local storage.
2641 .TP
2642 .B \fB\-\-spool\-dir\fP
2643 Directory used for staging extra WALs fetched when using \fB\-\-parallel\fP\&. Default is
2644 \fB/var/tmp/walrestore\fP\&.
2645 .TP
2646 .B \fB\-P\fP / \fB\-\-partial\fP
2647 Include partial WAL files (.partial) in the retrieval.
2648 .TP
2649 .B \fB\-z\fP / \fB\-\-gzip\fP
2650 Transfer WAL files compressed with \fBgzip\fP\&.
2651 .TP
2652 .B \fB\-j\fP / \fB\-\-bzip2\fP
2653 Transfer WAL files compressed with \fBbzip2\fP\&.
2654 .TP
2655 .B \fB\-\-keep\-compression\fP
2656 If specified, compressed files will be trasnfered as\-is and decompressed on arrival
2657 on the client\-side.
2658 .TP
2659 .B \fB\-c\fP / \fB\-\-config\fP
2660 Specify the configuration file on the Barman server.
2661 .TP
2662 .B \fB\-t\fP / \fB\-\-test\fP
2663 Test the connection and configuration of the specified Postgres server in Barman to
2664 ensure it is ready to receive WAL files. This option ignores the mandatory arguments
2665 \fBWAL_NAME\fP and \fBWAL_DEST\fP\&.
2666 .UNINDENT
2667 .sp
2668 \fBWarning:\fP
2669 .INDENT 0.0
2670 .INDENT 3.5
2671 \fB\-z\fP / \fB\-\-gzip\fP and \fB\-j\fP / \fB\-\-bzip2\fP options are deprecated and will be
2672 removed in the future. For WAL compression, please make sure to enable it directly
2673 on the Barman server via the \fBcompression\fP configuration option.
2674 .UNINDENT
2675 .UNINDENT
2676 .SH Author
2677 EnterpriseDB
2678 .SH Copyright
2679 © Copyright EnterpriseDB UK Limited 2011-2026
2680 .\" End of generated man page.