1% BARMAN-CLOUD-RESTORE(1) Barman User manuals | Version 2.17
2% EnterpriseDB <http://www.enterprisedb.com>
3% December 1, 2021
4
5# NAME
6
7barman-cloud-restore - Restore a PostgreSQL backup from the Cloud
8
9
10# SYNOPSIS
11
12barman-cloud-restore [*OPTIONS*] *SOURCE_URL* *SERVER_NAME* *BACKUP_ID* *RECOVERY_DIR*
13
14
15# DESCRIPTION
16
17This script can be used to download a backup previouslymade with
18`barman-cloud-backup` command. Currently AWS S3 and Azure Blob Storage
19are supported.
20
21This script and Barman are administration tools for disaster recovery
22of PostgreSQL servers written in Python and maintained by EnterpriseDB.
23
24
25# POSITIONAL ARGUMENTS
26
27SOURCE_URL
28:    URL of the cloud source, such as a bucket in AWS S3.
29     For example: `s3://BUCKET_NAME/path/to/folder` (where `BUCKET_NAME`
30     is the bucket you have created in AWS).
31
32SERVER_NAME
33:    the name of the server as configured in Barman.
34
35BACKUP_ID
36:    the ID of the backup to restore
37
38RECOVERY_DIR
39:    the path to a local directory for recovery (used as PGDATA).
40
41# OPTIONS
42
43-h, --help
44:    show a help message and exit
45
46-V, --version
47:    show program's version number and exit
48
49-v, --verbose
50:    increase output verbosity (e.g., -vv is more than -v)
51
52-q, --quiet
53:    decrease output verbosity (e.g., -qq is less than -q)
54
55-t, --test
56:    test connectivity to the cloud destination and exit
57
58--tablespace NAME:LOCATION
59: extract the named tablespace to the given directory instead of its
60original location (you may repeat the option for multiple tablespaces)
61
62--cloud-provider {aws-s3,azure-blob-storage}
63:    the cloud provider to which the backup should be uploaded
64
65-P, --profile
66:    profile name (e.g. INI section in AWS credentials file)
67
68--endpoint-url
69:    override the default S3 URL construction mechanism by specifying an endpoint.
70
71# REFERENCES
72
73For Boto:
74
75* https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html
76
77For AWS:
78
79* http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-set-up.html
80* http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html.
81
82For Azure Blob Storage:
83
84* https://docs.microsoft.com/en-us/azure/storage/blobs/authorize-data-operations-cli#set-environment-variables-for-authorization-parameters
85* https://docs.microsoft.com/en-us/python/api/azure-storage-blob/?view=azure-python
86
87# DEPENDENCIES
88
89If using `--cloud-provider=aws-s3`:
90
91* boto3
92
93If using `--cloud-provider=azure-blob-storage`:
94
95* azure-storage-blob
96* azure-identity (optional, if you wish to use DefaultAzureCredential)
97
98# EXIT STATUS
99
1000
101:   Success
102
103Not zero
104:   Failure
105
106
107# BUGS
108
109Barman has been extensively tested, and is currently being used in several
110production environments. However, we cannot exclude the presence of bugs.
111
112Any bug can be reported via the Github issue tracker.
113
114# RESOURCES
115
116* Homepage: <http://www.pgbarman.org/>
117* Documentation: <http://docs.pgbarman.org/>
118* Professional support: <http://www.enterprisedb.com/>
119
120
121# COPYING
122
123Barman is the property of EnterpriseDB UK Limited
124and its code is distributed under GNU General Public License v3.
125
126© Copyright EnterpriseDB UK Limited 2011-2021
127