-
Notifications
You must be signed in to change notification settings - Fork 31
/
pitrery.conf
196 lines (158 loc) · 7.13 KB
/
pitrery.conf
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
# pitrery.conf -- central configuration file for pitrery
#
# This file is intended to be copied for each backup set to be
# performed with pitrery.
#
####################
# Backup management
####################
# Data directory of the PostgreSQL cluster to backup.
#PGDATA="/var/lib/pgsql/data"
# Specify all needed information to be able to run SQL command on the
# PostgreSQL cluster to backup. Those options may be commented out to
# let the scripts use the ones defined in the environment (be careful
# with cron which may need them)
#PGUSER="postgres"
#PGPORT=5432
#PGHOST="/tmp"
#PGDATABASE="postgres"
# Command line to invoke psql.
#PGPSQL="psql"
# Target owner of the files when restoring with a different user
# (e.g. one may need to restore as root to create some missing
# directories, then PGOWNER should be set to "postgres" or whatever
# unprivileged user is used to run PostgreSQL)
#PGOWNER=
# If the transaction logs directory is outside PGDATA (see -X option
# of initdb), specify its path here to recreate the symbolic link when
# restoring.
#PGWAL=
# Directory where to store the files. Each backup has its own
# subdirectory named after the date and time it was launched.
#BACKUP_DIR="/var/lib/pgsql/backups/pitr"
# When performing backups to a remote host, a target host with a batch SSH
# access is needed (e.g. create passwordless SSH key pairs). Be aware
# that commands will be run by the scripts through SSH, so this should
# be allowed. Keep this empty to perform local backups.
#BACKUP_HOST=
# User to use when accessing BACKUP_HOST through SSH. If blank, the
# login will be performed with the default SSH configuration.
#BACKUP_USER=
# After restoring from a backup, PostgreSQL will need a command to run
# to get archived WAL segments that need to be replayed on the
# cluster files. This can be any valid command or script for the
# restore_command parameter of PostgreSQL (in recovery.conf). The
# restore_wal script is intended to be used here: leave empty to use it
#RESTORE_COMMAND=
# In PostgreSQL version 12 and greater, after restoring from a backup
# either a "standby.signal" or "recovery.signal" file must be created in
# $PGDATA to start the "recovery" in the desired mode.
# Use "recovery" (default) to restore the cluster at a given point in time
# Use "standby" for the creation of the standby cluster
#RESTORE_MODE="recovery"
# The old backups can be removed by setting one of those two
# parameters, one can keep at most PURGE_KEEP_COUNT backups or keep
# backups that are younger than PURGE_OLDER_THAN in days. When both
# parameters are set, age based purge keeps at least the given count.
#PURGE_KEEP_COUNT=
#PURGE_OLDER_THAN=
# Hooks. Command run at some point in the different actions
#PRE_BACKUP_COMMAND=
#POST_BACKUP_COMMAND=
# Backup storage method. "tar" creates one compressed tarball (with
# gzip) for PGDATA and each tablespace. "rsync" synchronizes PGDATA
# and each tablespace and try to optimize data transfer by hardlinking
# the previous backup (provided it was done with the "rsync"
# method). Use "tar" if space for the backup matters more than speed,
# use "rsync" if speed is more important.
#STORAGE="tar"
# Timestamp the messages.
#LOG_TIMESTAMP="no"
# When naming the backup directory from the stop time of the backup,
# use ISO 8601 format. Defaults to "no" to keep the backward
# compatibility, as mixing formats of backup names would break the
# sorting of backups on restore.
#USE_ISO8601_TIMESTAMPS="no"
# rsync storage method options.
# Disable the rsync on the fly comparison algorithm by adding
# --whole-file to the rsync commandline. This may improve performance
# over NFS.
#RSYNC_WHOLEFILE="no"
# Limit the bandwidth usage for rsync. This is the value of --bwlimit
# of rsync. with no unit, it is in kB/s.
#RSYNC_BWLIMIT=""
####################
# WAL archiving
####################
# The host storing the archived WAL files. Must not be set to trigger local
# archiving for archive_wal and restore_wal.
#ARCHIVE_HOST=
# The user for login to ARCHIVE_HOST through SSH. If blank, PostgreSQL
# server process owner is used
#ARCHIVE_USER=
# The directory where to look for archived WAL files on BACKUP_HOST.
#ARCHIVE_DIR="$BACKUP_DIR/archived_wal"
# Compress the WAL segment
#ARCHIVE_COMPRESS="yes"
# Allow overwriting the file when it exists in the archive
# directory. Since checking if the file exists before archiving has a
# performance overhead, the option is enabled by default.
#ARCHIVE_OVERWRITE="yes"
# Check the md5 of the archived file to the md5 of the original WAL file.
# Useful if you are paranoid or don't trust the remote storage reliability.
# Note that you can not check the archive if compression is enabled.
# If overwriting is disabled, the md5 check enabled and the archive already
# exists, the archiving returns success if the md5 check is successful.
#ARCHIVE_CHECK="no"
# Force an immediate flush of the archived file to disk before returning
# success. This is often a life saver on power loss to get ALL the archive back
# and clean.
#ARCHIVE_FLUSH="no"
# Logging options. When SYSLOG is no, messages are written to stderr,
# to allow the logging collector or redirection to catch them. These
# parameters are intended to match their counterparts in
# postgresql.conf. This only applies to WAL archiving.
#SYSLOG="no"
#SYSLOG_FACILITY="local0"
#SYSLOG_IDENT="postgres"
####################
# Compression
####################
# The following options allow to customize compression tools for WAL
# archiving. The program used in COMPRESS_BIN must support a -c option
# to output to stdout and access data from stdin (tested with gzip, pigz,
# bzip2, pbzip2, xz). Defaults to "gzip -f -4"
#ARCHIVE_COMPRESS_BIN="gzip -f -4"
# The suffix added by the compression tool (needed for
# decompression). Defaults to "gz"
#ARCHIVE_COMPRESS_SUFFIX="gz"
# Path to the decompression program, it must take the file to process
# as its first parameter. Defaults to "gunzip"
#ARCHIVE_UNCOMPRESS_BIN="gunzip"
# The compression used with the "tar" storage method can be configured
# with these options. The command must be able to be used with
# pipes (tested with gzip, pigz, bzip2, pbzip2). Defaults to "gzip -4".
#BACKUP_COMPRESS_BIN="gzip -4"
# The suffix added by the compression tool (needed for
# decompression). Defaults to "gz".
#BACKUP_COMPRESS_SUFFIX="gz"
# Path to the decompression program for backup using the "tar" storage
# method, it must take the file to process as its first parameter,
# work with pipes and be able output to stdout with -c. Defaults to
# "gunzip".
#BACKUP_UNCOMPRESS_BIN="gunzip"
####################
# Encryption (gpg)
####################
# This only applies to the tar storage, as ciphered files would not be
# synchronized by rsync. Note that compression options do not apply
# when encyrpting files as GPG already compresses the output file
# using zlib by default.
#BACKUP_ENCRYPT="no"
#ARCHIVE_ENCRYPT="no"
# When gpg encryption is unabled, specifies the recipients to encrypt
# data to. It can be a colon separated list of recipients. All public
# keys must be available in the keyring of the user running the
# PostgreSQL cluster and the user who runs pitrery for base backups if
# different.
#GPG_ENCRYPT_KEYS=""