-
Notifications
You must be signed in to change notification settings - Fork 10
/
pgsql-backup.conf
100 lines (80 loc) · 3.67 KB
/
pgsql-backup.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
# Username to access the PostgreSQL server e.g. dbuser
# Naturally, this user must have full access to all the databases you wish to
# have backed up.
CONFIG_PGUSER=postgres
CONFIG_PGPASSWORD=p4ssw0rd
# Host name (or IP address) of PostgreSQL server e.g localhost
CONFIG_PGHOST=localhost
CONFIG_PGPORT=5432
# This is the initial database to connect to. Only used to
# get list of databases on the server, no changes are made
# to this database so as long as it's a valid database for
# $PGUSER above to connect to then that's fine.
CONFIG_PGDATABASE=postgres
# List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3"
# Also supports the use of special keyword "all" to dump all databases that
# exist on the server.
CONFIG_DBNAMES="all"
# Backup directory location e.g /backups
CONFIG_BACKUPDIR="/mnt/backup/pgsql"
# Mail setup
# What would you like to be mailed to you?
# - log : send only log file
# - files : send log file and sql files as attachments (see docs)
# - stdout : will simply output the log to the screen if run manually.
# - quiet : Only send logs if an error occurs to the MAILADDR.
CONFIG_MAILCONTENT="stdout"
# Set the maximum allowed email size in k. (4000 = approx 5MB email [see docs])
CONFIG_MAXATTSIZE="4000"
# Email Address to send mail to? ([email protected])
#CONFIG_MAILADDR="[email protected]"
# ============================================================
# === Paths to binary programs used by the script ===
#=============================================================
## Only set these if your the script complains, or you need to ensure the
## script uses a specific version (ie, if you have multiple instances of
## postgresql installed)
#CONFIG_PG_DUMP='/usr/bin/pg_dump'
#CONFIG_PSQL='/usr/bin/psql'
#CONFIG_GZIP='/bin/gzip'
#CONFIG_BZIP2='/bin/bzip2'
#CONFIG_XZ='/usr/bin/xz'
#CONFIG_MAILX='/usr/bin/mail'
#CONFIG_OPENSSL='/usr/bin/openssl'
# =============================================================
# === ADVANCED OPTIONS (Make sure to RTFMP before changing) ===
#==============================================================
# List of DBNAMES to EXCLUDE if DBNAMES are set to all (must be in " quotes)
CONFIG_DBEXCLUDE="template0"
# Include CREATE DATABASE in backup?
CONFIG_CREATE_DATABASE=yes
# Which day do you want weekly backups? (1 to 7 where 1 is Monday)
CONFIG_DOWEEKLY=1
# Choose Compression type. (none, gzip or bzip2)
# Use 'none' if DUMPFORMAT='custom' and your PostgreSQL installation has zlib
# support to allow pg_dump to handle compression at dump time.
CONFIG_COMP=none
# Should the output files be encrypted using symmetric encryption?
# If enabled, you must specify a passphrase to use as the encrpytion key.
CONFIG_ENCRYPT=no
#CONFIG_ENCRYPT_PASSPHRASE=
# Additionally keep a copy of the most recent backup in a seperate directory.
CONFIG_LATEST=yes
# For connections to localhost. Sometimes the Unix socket file must be specified.
CONFIG_SOCKET=
# Using 'custom' is the most flexible format according to PostgreSQL developers.
# NOTE: using the 'tar' format requires sufficient temporary disk space (usually
# in /tmp) to dump an intermediatary copy of each database as part of the
# conversion to tar
# Refer to `man pg_dump` for more information on the 3 options.
CONFIG_DUMPFORMAT='custom'
#CONFIG_DUMPFORMAT='plain'
#CONFIG_DUMPFORMAT='tar'
# umask controls the permissions of created directories and files. The default
# is fairly restrictive (700 for directories, 600 for files). You may like/need
# to relax for your environment.
CONFIG_UMASK=0077
# Command to run before backups (uncomment to use)
#CONFIG_PREBACKUP="/etc/pgsql-backup/pre.sh"
# Command run after backups (uncomment to use)
#CONFIG_POSTBACKUP="/etc/pgsql-backup/post.sh"