1BARMAN-CLOUD-RESTORE(1) Version 3.0.1 BARMAN-CLOUD-RESTORE(1)
2
3
4
6 barman-cloud-restore - Restore a PostgreSQL backup from the Cloud
7
9 barman-cloud-restore [OPTIONS] SOURCE_URL SERVER_NAME BACKUP_ID RECOV‐
10 ERY_DIR
11
13 This script can be used to download a backup previously made with bar‐
14 man-cloud-backup command. Currently AWS S3, Azure Blob Storage and
15 Google Cloud Storage are supported.
16
17 This script and Barman are administration tools for disaster recovery
18 of PostgreSQL servers written in Python and maintained by EnterpriseDB.
19
21 SOURCE_URL
22 URL of the cloud source, such as a bucket in AWS S3. For exam‐
23 ple: s3://BUCKET_NAME/path/to/folder (where BUCKET_NAME is the
24 bucket you have created in AWS).
25
26 SERVER_NAME
27 the name of the server as configured in Barman.
28
29 BACKUP_ID
30 the ID of the backup to restore
31
32 RECOVERY_DIR
33 the path to a local directory for recovery (used as PGDATA).
34
36 -h, –help
37 show a help message and exit
38
39 -V, –version
40 show program's version number and exit
41
42 -v, –verbose
43 increase output verbosity (e.g., -vv is more than -v)
44
45 -q, –quiet
46 decrease output verbosity (e.g., -qq is less than -q)
47
48 -t, –test
49 test connectivity to the cloud destination and exit
50
51 –tablespace NAME:LOCATION
52 extract the named tablespace to the given directory instead of
53 its original location (you may repeat the option for multiple
54 tablespaces)
55
56 –cloud-provider {aws-s3,azure-blob-storage,google-cloud-storage}
57 the cloud provider to which the backup should be uploaded
58
59 -P, –profile
60 profile name (e.g. INI section in AWS credentials file)
61
62 –endpoint-url
63 override the default S3 URL construction mechanism by specifying
64 an endpoint.
65
66 –credential {azure-cli,managed-identity}
67 optionally specify the type of credential to use when authenti‐
68 cating with Azure Blob Storage. If omitted then the credential
69 will be obtained from the environment. If no credentials can be
70 found in the environment then the default Azure authentication
71 flow will be used.
72
74 For Boto:
75
76 • https://boto3.amazonaws.com/v1/documentation/api/latest/guide/config‐
77 uration.html
78
79 For AWS:
80
81 • https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-get‐
82 ting-set-up.html
83
84 • https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-get‐
85 ting-started.html.
86
87 For Azure Blob Storage:
88
89 • https://docs.microsoft.com/en-us/azure/storage/blobs/authorize-da‐
90 ta-operations-cli#set-environment-variables-for-authorization-parame‐
91 ters
92
93 • https://docs.microsoft.com/en-us/python/api/azure-stor‐
94 age-blob/?view=azure-python
95
96 For Google Cloud Storage: * Credentials:
97 https://cloud.google.com/docs/authentication/getting-started#set‐
98 ting_the_environment_variable
99
100 Only authentication with GOOGLE_APPLICATION_CREDENTIALS env is support‐
101 ed at the moment.
102
104 If using --cloud-provider=aws-s3:
105
106 • boto3
107
108 If using --cloud-provider=azure-blob-storage:
109
110 • azure-storage-blob
111
112 • azure-identity (optional, if you wish to use DefaultAzureCredential)
113
114 If using --cloud-provider=google-cloud-storage * google-cloud-storage
115
117 0 Success
118
119 1 The restore was not successful
120
121 2 The connection to the cloud provider failed
122
123 3 There was an error in the command input
124
125 Other non-zero codes
126 Failure
127
129 Barman has been extensively tested, and is currently being used in sev‐
130 eral production environments. However, we cannot exclude the presence
131 of bugs.
132
133 Any bug can be reported via the Github issue tracker.
134
136 • Homepage: <https://www.pgbarman.org/>
137
138 • Documentation: <https://docs.pgbarman.org/>
139
140 • Professional support: <https://www.enterprisedb.com/>
141
143 Barman is the property of EnterpriseDB UK Limited and its code is dis‐
144 tributed under GNU General Public License v3.
145
146 © Copyright EnterpriseDB UK Limited 2011-2022
147
149 EnterpriseDB <https://www.enterprisedb.com>.
150
151
152
153Barman User manuals June 27, 2022 BARMAN-CLOUD-RESTORE(1)