/pgsql-backup.conf
Config | 104 lines | 83 code | 21 blank | 0 comment | 0 complexity | 8cbfaee857c91634089dcc79b10c9ab0 MD5 | raw file
Possible License(s): GPL-2.0
- # 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? (user@domain.com)
- #CONFIG_MAILADDR="you@example.com"
- # ============================================================
- # === 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_PG_DUMPALL='/usr/bin/pg_dumpall'
- #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
- # Make a dump of the PostgreSQL globals (ie login roles)
- #CONFIG_DUMP_GLOBALS=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"