-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample.yaml
More file actions
69 lines (58 loc) · 2.68 KB
/
Copy pathexample.yaml
File metadata and controls
69 lines (58 loc) · 2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# pgctl config. Copy this, change every value, point --config at it.
#
# Resolved from --config, else $PGCTL_CONFIG, else ./pgctl.yaml.
#
# No credentials live here, and none are needed: pgctl reads the object-storage
# credentials out of your running postgres container's own environment, which is
# how `docker exec` into it can already reach the bucket. This file is not
# sensitive.
targets:
# The name is what you pass to --env.
example-production:
# The machine pgctl operates the database from. Reached over ssh unless
# --local. It need not match the target name.
host: db.example.com
# Optional. Who to ssh in as. Omit and ssh uses your local user, as it would
# on the command line. --ssh-user overrides this.
ssh_user: deploy
# Your live postgres container on that host. pgctl reaches barman by
# exec-ing into it, and reads the object-storage credentials from its
# environment.
container: example-postgres
# The image the throwaway restore/drill container boots. It needs
# barman-cloud-* on its PATH, and its major version must match the backup's
# -- the drill asserts PG_VERSION against it, so a mismatch fails every
# drill.
image: ghcr.io/example/postgres-barman:18
db: example
# NOT necessarily "postgres". If your cluster was initialized with
# POSTGRES_USER=example then no "postgres" role exists, and assuming
# otherwise is what fails every backup, silently.
role: example
# The barman server name: which set of backups in the bucket is this one.
server: example-production
bucket: s3://example-backups/api
endpoint: https://s3.example.com
# Both the prune window and the drill's staleness bound. A backup older than
# this means backups have been broken for longer than you keep them, so the
# drill refuses to pass on it. Must be greater than 0.
retention_days: 30
# What the drill asks the restored database to prove it holds real data.
# Pick something that is never legitimately empty.
smoke_sql: SELECT count(*) FROM public.users
# Optional. Where PGDATA sits inside `image`, relative to its postgres
# volume. Defaults to 18/docker. Postgres nests the data dir by major
# version, so set this if your image is not 18.
# pgdata_subpath: 17/docker
# A second target: preview, kept for a week rather than a month.
example-preview:
host: preview.example.com
container: example-postgres
image: ghcr.io/example/postgres-barman:18
db: example_preview
role: example
server: example-preview
bucket: s3://example-backups-preview/api
endpoint: https://s3.example.com
retention_days: 7
smoke_sql: SELECT count(*) FROM public.users