1BARMAN-CLOUD-RESTORE(1)          Version 3.9.0         BARMAN-CLOUD-RESTORE(1)
2
3
4

NAME

6       barman-cloud-restore - Restore a PostgreSQL backup from the Cloud
7

SYNOPSIS

9       barman-cloud-restore  [OPTIONS] SOURCE_URL SERVER_NAME BACKUP_ID RECOV‐
10       ERY_DIR
11

DESCRIPTION

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 can also be used to prepare for recovery  from  a  snapshot
18       backup  by  checking  the  attached  disks were cloned from the correct
19       snapshots and downloading the backup label from object storage.
20
21       This script and Barman are administration tools for  disaster  recovery
22       of PostgreSQL servers written in Python and maintained by EnterpriseDB.
23

Usage

25              usage: barman-cloud-restore [-V] [--help] [-v | -q] [-t]
26                                          [--cloud-provider {aws-s3,azure-blob-storage,google-cloud-storage}]
27                                          [--endpoint-url ENDPOINT_URL] [-P AWS_PROFILE]
28                                          [--profile AWS_PROFILE]
29                                          [--read-timeout READ_TIMEOUT]
30                                          [--azure-credential {azure-cli,managed-identity}]
31                                          [--tablespace NAME:LOCATION]
32                                          [--snapshot-recovery-instance SNAPSHOT_RECOVERY_INSTANCE]
33                                          [--snapshot-recovery-zone GCP_ZONE]
34                                          [--aws-region AWS_REGION] [--gcp-zone GCP_ZONE]
35                                          [--azure-resource-group AZURE_RESOURCE_GROUP]
36                                          source_url server_name backup_id recovery_dir
37
38              This script can be used to download a backup previously made with barman-
39              cloud-backup command.Currently AWS S3, Azure Blob Storage and Google Cloud
40              Storage are supported.
41
42              positional arguments:
43                source_url            URL of the cloud source, such as a bucket in AWS S3.
44                                      For example: `s3://bucket/path/to/folder`.
45                server_name           the name of the server as configured in Barman.
46                backup_id             the backup ID
47                recovery_dir          the path to a directory for recovery.
48
49              optional arguments:
50                -V, --version         show program's version number and exit
51                --help                show this help message and exit
52                -v, --verbose         increase output verbosity (e.g., -vv is more than -v)
53                -q, --quiet           decrease output verbosity (e.g., -qq is less than -q)
54                -t, --test            Test cloud connectivity and exit
55                --cloud-provider {aws-s3,azure-blob-storage,google-cloud-storage}
56                                      The cloud provider to use as a storage backend
57                --tablespace NAME:LOCATION
58                                      tablespace relocation rule
59                --snapshot-recovery-instance SNAPSHOT_RECOVERY_INSTANCE
60                                      Instance where the disks recovered from the snapshots
61                                      are attached
62                --snapshot-recovery-zone GCP_ZONE
63                                      Zone containing the instance and disks for the
64                                      snapshot recovery (deprecated: replaced by --gcp-zone)
65
66              Extra options for the aws-s3 cloud provider:
67                --endpoint-url ENDPOINT_URL
68                                      Override default S3 endpoint URL with the given one
69                -P AWS_PROFILE, --aws-profile AWS_PROFILE
70                                      profile name (e.g. INI section in AWS credentials
71                                      file)
72                --profile AWS_PROFILE
73                                      profile name (deprecated: replaced by --aws-profile)
74                --read-timeout READ_TIMEOUT
75                                      the time in seconds until a timeout is raised when
76                                      waiting to read from a connection (defaults to 60
77                                      seconds)
78                --aws-region AWS_REGION
79                                      Name of the AWS region where the instance and disks
80                                      for snapshot recovery are located
81
82              Extra options for the azure-blob-storage cloud provider:
83                --azure-credential {azure-cli,managed-identity}, --credential {azure-cli,managed-identity}
84                                      Optionally specify the type of credential to use when
85                                      authenticating with Azure. If omitted then Azure Blob
86                                      Storage credentials will be obtained from the
87                                      environment and the default Azure authentication flow
88                                      will be used for authenticating with all other Azure
89                                      services. If no credentials can be found in the
90                                      environment then the default Azure authentication flow
91                                      will also be used for Azure Blob Storage.
92                --azure-resource-group AZURE_RESOURCE_GROUP
93                                      Resource group containing the instance and disks for
94                                      the snapshot recovery
95
96              Extra options for google-cloud-storage cloud provider:
97                --gcp-zone GCP_ZONE   Zone containing the instance and disks for the
98                                      snapshot recovery
99

REFERENCES

101       For Boto:
102
103https://boto3.amazonaws.com/v1/documentation/api/latest/guide/config
104         uration.html
105
106       For AWS:
107
108https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-get
109         ting-set-up.html
110
111https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-get
112         ting-started.html.
113
114       For Azure Blob Storage:
115
116https://docs.microsoft.com/en-us/azure/storage/blobs/authorize-da
117         ta-operations-cli#set-environment-variables-for-authorization-parame‐
118         ters
119
120https://docs.microsoft.com/en-us/python/api/azure-stor
121         age-blob/?view=azure-python
122
123       For        Google       Cloud       Storage:       *       Credentials:
124       https://cloud.google.com/docs/authentication/getting-started#set‐
125       ting_the_environment_variable
126
127       Only authentication with GOOGLE_APPLICATION_CREDENTIALS env is support‐
128       ed at the moment.
129

DEPENDENCIES

131       If using --cloud-provider=aws-s3:
132
133       • boto3
134
135       If using --cloud-provider=azure-blob-storage:
136
137       • azure-storage-blob
138
139       • azure-identity (optional, if you wish to use DefaultAzureCredential)
140
141       If using --cloud-provider=google-cloud-storage * google-cloud-storage
142
143       If using --cloud-provider=google-cloud-storage with snapshot backups  *
144       grpcio * google-cloud-compute
145

EXIT STATUS

147       0      Success
148
149       1      The restore was not successful
150
151       2      The connection to the cloud provider failed
152
153       3      There was an error in the command input
154
155       Other non-zero codes
156              Failure
157

BUGS

159       Barman has been extensively tested, and is currently being used in sev‐
160       eral production environments.  However, we cannot exclude the  presence
161       of bugs.
162
163       Any bug can be reported via the GitHub issue tracker.
164

RESOURCES

166       • Homepage: <https://www.pgbarman.org/>
167
168       • Documentation: <https://docs.pgbarman.org/>
169
170       • Professional support: <https://www.enterprisedb.com/>
171

COPYING

173       Barman  is the property of EnterpriseDB UK Limited and its code is dis‐
174       tributed under GNU General Public License v3.
175
176       © Copyright EnterpriseDB UK Limited 2011-2023
177

AUTHORS

179       EnterpriseDB <https://www.enterprisedb.com>.
180
181
182
183Barman User manuals             October 3, 2023        BARMAN-CLOUD-RESTORE(1)
Impressum