Debian Codegraph @

docs/_build/man/barman-cloud-backup.1

raw
1 .\" Man page generated from reStructuredText
2 .\" by the Docutils 0.22.4 manpage writer.
3 .
4 .
5 .nr rst2man-indent-level 0
6 .
7 .de1 rstReportMargin
8 \\$1 \\n[an-margin]
9 level \\n[rst2man-indent-level]
10 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
11 -
12 \\n[rst2man-indent0]
13 \\n[rst2man-indent1]
14 \\n[rst2man-indent2]
15 ..
16 .de1 INDENT
17 .\" .rstReportMargin pre:
18 . RS \\$1
19 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20 . nr rst2man-indent-level +1
21 .\" .rstReportMargin post:
22 ..
23 .de UNINDENT
24 . RE
25 .\" indent \\n[an-margin]
26 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27 .nr rst2man-indent-level -1
28 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
30 ..
31 .TH "BARMAN-CLOUD-BACKUP" "1" "Sep 29, 2026" "3.20" "Barman"
32 .SH NAME
33 barman-cloud-backup \- Barman-cloud Commands
34 .sp
35 \fBSynopsis\fP
36 .INDENT 0.0
37 .INDENT 3.5
38 .sp
39 .EX
40 barman\-cloud\-backup
41 [ { \-V | \-\-version } ]
42 [ \-\-help ]
43 [ { { \-v | \-\-verbose } | { \-q | \-\-quiet } } ]
44 [ { \-t | \-\-test } ]
45 [ \-\-cloud\-provider { aws\-s3 | azure\-blob\-storage | google\-cloud\-storage } ]
46 [ { { \-z | \-\-gzip } | { \-j | \-\-bzip2 } | \-\-snappy | \-\-lz4 | \-\-zstd } ]
47 [ { \-h | \-\-host } HOST ]
48 [ { \-p | \-\-port } PORT ]
49 [ { \-U | \-\-user } USER ]
50 [ { \-d | \-\-dbname } DBNAME ]
51 [ { \-n | \-\-name } BACKUP_NAME ]
52 [ { \-J | \-\-jobs } JOBS ]
53 [ { \-S | \-\-max\-archive\-size } MAX_ARCHIVE_SIZE ]
54 [ \-\-immediate\-checkpoint ]
55 [ \-\-min\-chunk\-size MIN_CHUNK_SIZE ]
56 [ \-\-max\-bandwidth MAX_BANDWIDTH ]
57 [ \-\-keepalive\-interval KEEPALIVE_INTERVAL ]
58 [ \-\-snapshot\-instance SNAPSHOT_INSTANCE ]
59 [ \-\-snapshot\-disk NAME [ \-\-snapshot\-disk NAME ... ] ]
60 [ \-\-snapshot\-zone GCP_ZONE ]
61 [ \-snapshot\-gcp\-project GCP_PROJECT ]
62 [ \-\-tag KEY,VALUE [ \-\-tag KEY,VALUE ... ] ]
63 [ \-\-endpoint\-url ENDPOINT_URL ]
64 [ \-\-addressing\-style { auto | virtual | path } ]
65 [ { \-P | \-\-aws\-profile } AWS_PROFILE ]
66 [ \-\-profile AWS_PROFILE ]
67 [ \-\-read\-timeout READ_TIMEOUT ]
68 [ { \-e | \-\-encryption } { AES256 | aws:kms } ]
69 [ \-\-sse\-kms\-key\-id SSE_KMS_KEY_ID ]
70 [ \-\-sse\-customer\-key SSE_CUSTOMER_KEY ]
71 [ \-\-aws\-region AWS_REGION ]
72 [ \-\-aws\-await\-snapshots\-timeout AWS_AWAIT_SNAPSHOTS_TIMEOUT ]
73 [ \-\-aws\-snapshot\-lock\-mode { compliance | governance } ]
74 [ \-\-aws\-snapshot\-lock\-duration DAYS ]
75 [ \-\-aws\-snapshot\-lock\-cool\-off\-period HOURS ]
76 [ \-\-aws\-snapshot\-lock\-expiration\-date DATETIME ]
77 [ { \-\-azure\-credential | \-\-credential } { azure\-cli | managed\-identity | default } ]
78 [ \-\-encryption\-scope ENCRYPTION_SCOPE ]
79 [ \-\-azure\-subscription\-id AZURE_SUBSCRIPTION_ID ]
80 [ \-\-azure\-resource\-group AZURE_RESOURCE_GROUP ]
81 [ \-\-gcp\-project GCP_PROJECT ]
82 [ \-\-kms\-key\-name KMS_KEY_NAME ]
83 [ \-\-gcp\-zone GCP_ZONE ]
84 DESTINATION_URL SERVER_NAME
85 .EE
86 .UNINDENT
87 .UNINDENT
88 .sp
89 \fBDescription\fP
90 .sp
91 The \fBbarman\-cloud\-backup\fP script is used to create a local backup of a Postgres
92 server and transfer it to a supported cloud provider, bypassing the Barman server. It
93 can also be utilized as a hook script for copying Barman backups from the Barman server
94 to one of the supported clouds (post_backup_retry_script).
95 .sp
96 This script requires read access to PGDATA and tablespaces, typically run as the
97 postgres user. When used on a Barman server, it requires read access to the directory
98 where Barman backups are stored. If \fB\-\-snapshot\-\fP arguments are used and snapshots are
99 supported by the selected cloud provider, the backup will be performed using snapshots
100 of the specified disks (\fB\-\-snapshot\-disk\fP). The backup label and metadata will also be
101 uploaded to the cloud.
102 .sp
103 \fBNote:\fP
104 .INDENT 0.0
105 .INDENT 3.5
106 For GCP, only authentication with \fBGOOGLE_APPLICATION_CREDENTIALS\fP env is supported.
107 To use an alternative GCP universe (e.g. S3NS/T\-Systems), set the
108 \fBGOOGLE_CLOUD_UNIVERSE_DOMAIN\fP environment variable to the desired universe domain.
109 .UNINDENT
110 .UNINDENT
111 .sp
112 \fBImportant:\fP
113 .INDENT 0.0
114 .INDENT 3.5
115 The cloud upload may fail if any file larger than the configured \fB\-\-max\-archive\-size\fP
116 is present in the data directory or tablespaces. However, Postgres files up to
117 \fB1GB\fP are always allowed, regardless of the \fB\-\-max\-archive\-size\fP setting.
118 .UNINDENT
119 .UNINDENT
120 .sp
121 \fBParameters\fP
122 .INDENT 0.0
123 .TP
124 .B \fBSERVER_NAME\fP
125 Name of the server to be backed up.
126 .TP
127 .B \fBDESTINATION_URL\fP
128 URL of the cloud destination, such as a bucket in AWS S3. For example:
129 \fBs3://bucket/path/to/folder\fP\&.
130 .TP
131 .B \fB\-V\fP / \fB\-\-version\fP
132 Show version and exit.
133 .TP
134 .B \fB\-\-help\fP
135 show this help message and exit.
136 .TP
137 .B \fB\-v\fP / \fB\-\-verbose\fP
138 Increase output verbosity (e.g., \fB\-vv\fP is more than \fB\-v\fP).
139 .TP
140 .B \fB\-q\fP / \fB\-\-quiet\fP
141 Decrease output verbosity (e.g., \fB\-qq\fP is less than \fB\-q\fP).
142 .TP
143 .B \fB\-t\fP / \fB\-\-test\fP
144 Test cloud connectivity and exit.
145 .TP
146 .B \fB\-\-cloud\-provider\fP
147 The cloud provider to use as a storage backend.
148 .sp
149 Allowed options:
150 .INDENT 7.0
151 .IP \(bu 2
152 \fBaws\-s3\fP\&.
153 .IP \(bu 2
154 \fBazure\-blob\-storage\fP\&.
155 .IP \(bu 2
156 \fBgoogle\-cloud\-storage\fP\&.
157 .UNINDENT
158 .TP
159 .B \fB\-z\fP / \fB\-\-gzip\fP
160 gzip\-compress the backup while uploading to the cloud (should not be used with python <
161 3.2).
162 .TP
163 .B \fB\-j\fP / \fB\-\-bzip2\fP
164 bzip2\-compress the backup while uploading to the cloud (should not be used with python <
165 3.3).
166 .TP
167 .B \fB\-\-snappy\fP
168 snappy\-compress the backup while uploading to the cloud (requires optional
169 \fBpython\-snappy\fP library).
170 .TP
171 .B \fB\-\-lz4\fP
172 lz4\-compress the backup while uploading to the cloud (requires optional
173 \fBlz4\fP Python library).
174 .TP
175 .B \fB\-\-zstd\fP
176 zstd\-compress the backup while uploading to the cloud (requires optional
177 \fBzstandard\fP Python library).
178 .TP
179 .B \fB\-h\fP / \fB\-\-host\fP
180 Host or Unix socket for Postgres connection (default: libpq settings).
181 .TP
182 .B \fB\-p\fP / \fB\-\-port\fP
183 Port for Postgres connection (default: libpq settings).
184 .TP
185 .B \fB\-U\fP / \fB\-\-user\fP
186 User name for Postgres connection (default: libpq settings).
187 .TP
188 .B \fB\-d\fP / \fB\-\-dbname\fP
189 Database name or conninfo string for Postgres connection (default: \(dqpostgres\(dq).
190 .TP
191 .B \fB\-n\fP / \fB\-\-name\fP
192 A name which can be used to reference this backup in commands such as
193 \fBbarman\-cloud\-restore\fP and \fBbarman\-cloud\-backup\-delete\fP\&.
194 .TP
195 .B \fB\-J\fP / \fB\-\-jobs\fP
196 Number of subprocesses to upload data to cloud storage (default: \fB2\fP).
197 .TP
198 .B \fB\-S\fP / \fB\-\-max\-archive\-size\fP
199 Maximum size of an archive when uploading to cloud storage (default: \fB100GB\fP).
200 .TP
201 .B \fB\-\-immediate\-checkpoint\fP
202 Forces the initial checkpoint to be done as quickly as possible.
203 .TP
204 .B \fB\-\-min\-chunk\-size\fP
205 Minimum size of an individual chunk when uploading to cloud storage (default: \fB5MB\fP
206 for \fBaws\-s3\fP, \fB64KB\fP for \fBazure\-blob\-storage\fP, not applicable for
207 \fBgoogle\-cloud\-storage\fP).
208 .TP
209 .B \fB\-\-max\-bandwidth\fP
210 The maximum amount of data to be uploaded per second when backing up to object
211 storages (default: \fB0\fP \- no limit).
212 .TP
213 .B \fB\-\-keepalive\-interval\fP
214 An interval, in seconds, at which a heartbeat query is sent to the PostgreSQL server
215 to keep the connection alive during the upload phase (default: \fB60\fP). A value of
216 \fB0\fP disables the heartbeat.
217 .TP
218 .B \fB\-\-snapshot\-instance\fP
219 Instance where the disks to be backed up as snapshots are attached.
220 .TP
221 .B \fB\-\-snapshot\-disk\fP
222 Name of a disk from which snapshots should be taken.
223 .TP
224 .B \fB\-\-tag\fP
225 Tag to be added to all uploaded files in cloud storage, and/or to snapshots created,
226 if snapshots are used.
227 .TP
228 .B \fB\-\-tags\fP
229 Tags to be added to all uploaded files in cloud storage, and/or to snapshots created,
230 if snapshots are used.
231 .UNINDENT
232 .sp
233 \fBNote:\fP
234 .INDENT 0.0
235 .INDENT 3.5
236 If you are using \fB\-\-tags\fP before positional arguments, you must insert \fB\-\-\fP after
237 it to indicate the end of optional arguments. This tells the parser to treat
238 everything after \fB\-\-\fP as positional arguments. Without the \fB\-\-\fP, Barman may
239 misinterpret positional arguments as values for the last option.
240 .UNINDENT
241 .UNINDENT
242 .sp
243 Deprecated since version 3.15: \fB\-\-tags\fP is deprecated. Use \fB\-\-tag\fP instead.
244
245 .sp
246 \fBExtra options for the AWS cloud provider\fP
247 .INDENT 0.0
248 .TP
249 .B \fB\-\-endpoint\-url\fP
250 Override default S3 endpoint URL with the given one.
251 .TP
252 .B \fB\-\-addressing\-style\fP
253 The addressing style to use for S3 requests. This is useful when connecting to
254 S3\-compatible services that require a specific addressing style.
255 .sp
256 Allowed options are:
257 .INDENT 7.0
258 .IP \(bu 2
259 \fBauto\fP (default): Uses the addressing style determined by the underlying library.
260 .IP \(bu 2
261 \fBvirtual\fP: Uses virtual\-hosted style addressing (e.g., bucket\-name.s3.amazonaws.com).
262 .IP \(bu 2
263 \fBpath\fP: Uses path\-style addressing (e.g., s3.amazonaws.com/bucket\-name).
264 .UNINDENT
265 .TP
266 .B \fB\-P\fP / \fB\-\-aws\-profile\fP
267 Profile name (e.g. \fBINI\fP section in AWS credentials file).
268 .TP
269 .B \fB\-\-profile\fP (deprecated)
270 Profile name (e.g. \fBINI\fP section in AWS credentials file) \- replaced by
271 \fB\-\-aws\-profile\fP\&.
272 .TP
273 .B \fB\-\-read\-timeout\fP
274 The time in seconds until a timeout is raised when waiting to read from a connection
275 (defaults to \fB60\fP seconds).
276 .TP
277 .B \fB\-e\fP / \fB\-\-encryption\fP
278 The encryption algorithm used when storing the uploaded data in S3.
279 .sp
280 Allowed options:
281 .INDENT 7.0
282 .IP \(bu 2
283 \fBAES256\fP\&.
284 .IP \(bu 2
285 \fBaws:kms\fP\&.
286 .UNINDENT
287 .TP
288 .B \fB\-\-sse\-kms\-key\-id\fP
289 The AWS KMS key ID that should be used for encrypting the uploaded data in S3. Can be
290 specified using the key ID on its own or using the full ARN for the key. Only allowed if
291 \fB\-e\fP / \fB\-\-encryption\fP is set to \fBaws:kms\fP\&.
292 .TP
293 .B \fB\-\-sse\-customer\-key\fP
294 The customer\-provided encryption key (SSE\-C) to use for encrypting and decrypting
295 data in S3. The value must be a \fBfile://\fP URI pointing to a file containing a
296 base64\-encoded 256\-bit (32\-byte) key (e.g. \fBfile:///etc/barman/sse\-c.b64\fP). Cannot
297 be used together with \fB\-\-sse\-kms\-key\-id\fP or \fB\-e\fP / \fB\-\-encryption\fP\&.
298 .sp
299 \fBImportant:\fP
300 .INDENT 7.0
301 .INDENT 3.5
302 All backups and WAL files for a given server must be encrypted with the same SSE\-C
303 key. Mixing SSE\-C\-encrypted and unencrypted objects, or using different keys across
304 backups, will cause barman commands to fail when S3 rejects requests with a
305 mismatched or missing key.
306 .UNINDENT
307 .UNINDENT
308 .TP
309 .B \fB\-\-aws\-region\fP
310 The name of the AWS region containing the EC2 VM and storage volumes defined by the
311 \fB\-\-snapshot\-instance\fP and \fB\-\-snapshot\-disk\fP arguments.
312 .TP
313 .B \fB\-\-aws\-await\-snapshots\-timeout\fP
314 The length of time in seconds to wait for snapshots to be created in AWS before timing
315 out (default: 3600 seconds).
316 .TP
317 .B \fB\-\-aws\-snapshot\-lock\-mode\fP
318 The lock mode for the snapshot. This is only valid if \fB\-\-snapshot\-instance\fP and
319 \fB\-\-snapshot\-disk\fP are set.
320 .sp
321 Allowed options:
322 .INDENT 7.0
323 .IP \(bu 2
324 \fBcompliance\fP\&.
325 .IP \(bu 2
326 \fBgovernance\fP\&.
327 .UNINDENT
328 .TP
329 .B \fB\-\-aws\-snapshot\-lock\-duration\fP
330 The lock duration is the period of time (in days) for which the snapshot is to remain
331 locked, ranging from 1 to 36,500. Set either the lock duration or the expiration date
332 (not both).
333 .TP
334 .B \fB\-\-aws\-snapshot\-lock\-cool\-off\-period\fP
335 The cooling\-off period is an optional period of time (in hours) that you can specify
336 when you lock a snapshot in \fBcompliance\fP mode, ranging from 1 to 72.
337 .TP
338 .B \fB\-\-aws\-snapshot\-lock\-expiration\-date\fP
339 The lock duration is determined by an expiration date in the future. It must be at
340 least 1 day after the snapshot creation date and time, using the format
341 \fBYYYY\-MM\-DDTHH:MM:SS.sssZ\fP\&. Set either the lock duration or the expiration date
342 (not both).
343 .UNINDENT
344 .sp
345 \fBExtra options for the Azure cloud provider\fP
346 .INDENT 0.0
347 .TP
348 .B \fB\-\-azure\-credential / \-\-credential\fP
349 Optionally specify the type of credential to use when authenticating with Azure. If
350 omitted then Azure Blob Storage credentials will be obtained from the environment and
351 the default Azure authentication flow will be used for authenticating with all other
352 Azure services. If no credentials can be found in the environment then the default
353 Azure authentication flow will also be used for Azure Blob Storage.
354 .sp
355 Allowed options:
356 .INDENT 7.0
357 .IP \(bu 2
358 \fBazure\-cli\fP\&.
359 .IP \(bu 2
360 \fBmanaged\-identity\fP\&.
361 .IP \(bu 2
362 \fBdefault\fP\&.
363 .UNINDENT
364 .TP
365 .B \fB\-\-encryption\-scope\fP
366 The name of an encryption scope defined in the Azure Blob Storage service which is to
367 be used to encrypt the data in Azure.
368 .TP
369 .B \fB\-\-azure\-subscription\-id\fP
370 The ID of the Azure subscription which owns the instance and storage volumes defined by
371 the \fB\-\-snapshot\-instance\fP and \fB\-\-snapshot\-disk\fP arguments.
372 .TP
373 .B \fB\-\-azure\-resource\-group\fP
374 The name of the Azure resource group to which the compute instance and disks defined by
375 the \fB\-\-snapshot\-instance\fP and \fB\-\-snapshot\-disk\fP arguments belong.
376 .UNINDENT
377 .sp
378 \fBExtra options for GCP cloud provider\fP
379 .INDENT 0.0
380 .TP
381 .B \fB\-\-gcp\-project\fP
382 GCP project under which disk snapshots should be stored.
383 .TP
384 .B \fB\-\-snapshot\-gcp\-project\fP (deprecated)
385 GCP project under which disk snapshots should be stored \- replaced by
386 \fB\-\-gcp\-project\fP\&.
387 .TP
388 .B \fB\-\-kms\-key\-name\fP
389 The name of the GCP KMS key which should be used for encrypting the uploaded data in
390 GCS.
391 .TP
392 .B \fB\-\-gcp\-zone\fP
393 Zone of the disks from which snapshots should be taken.
394 .TP
395 .B \fB\-\-snapshot\-zone\fP (deprecated)
396 Zone of the disks from which snapshots should be taken \- replaced by \fB\-\-gcp\-zone\fP\&.
397 .UNINDENT
398 .SH Author
399 EnterpriseDB
400 .SH Copyright
401 © Copyright EnterpriseDB UK Limited 2011-2026
402 .\" End of generated man page.