PageRenderTime 51ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 0ms

/pgsql-backup.conf

https://github.com/fukawi2/pgsql-backup
Config | 104 lines | 83 code | 21 blank | 0 comment | 0 complexity | 8cbfaee857c91634089dcc79b10c9ab0 MD5 | raw file
Possible License(s): GPL-2.0
  1. # Username to access the PostgreSQL server e.g. dbuser
  2. # Naturally, this user must have full access to all the databases you wish to
  3. # have backed up.
  4. CONFIG_PGUSER=postgres
  5. CONFIG_PGPASSWORD=p4ssw0rd
  6. # Host name (or IP address) of PostgreSQL server e.g localhost
  7. CONFIG_PGHOST=localhost
  8. CONFIG_PGPORT=5432
  9. # This is the initial database to connect to. Only used to
  10. # get list of databases on the server, no changes are made
  11. # to this database so as long as it's a valid database for
  12. # $PGUSER above to connect to then that's fine.
  13. CONFIG_PGDATABASE=postgres
  14. # List of DBNAMES for Daily/Weekly Backup e.g. "DB1 DB2 DB3"
  15. # Also supports the use of special keyword "all" to dump all databases that
  16. # exist on the server.
  17. CONFIG_DBNAMES="all"
  18. # Backup directory location e.g /backups
  19. CONFIG_BACKUPDIR="/mnt/backup/pgsql"
  20. # Mail setup
  21. # What would you like to be mailed to you?
  22. # - log : send only log file
  23. # - files : send log file and sql files as attachments (see docs)
  24. # - stdout : will simply output the log to the screen if run manually.
  25. # - quiet : Only send logs if an error occurs to the MAILADDR.
  26. CONFIG_MAILCONTENT="stdout"
  27. # Set the maximum allowed email size in k. (4000 = approx 5MB email [see docs])
  28. CONFIG_MAXATTSIZE="4000"
  29. # Email Address to send mail to? (user@domain.com)
  30. #CONFIG_MAILADDR="you@example.com"
  31. # ============================================================
  32. # === Paths to binary programs used by the script ===
  33. #=============================================================
  34. ## Only set these if your the script complains, or you need to ensure the
  35. ## script uses a specific version (ie, if you have multiple instances of
  36. ## postgresql installed)
  37. #CONFIG_PG_DUMP='/usr/bin/pg_dump'
  38. #CONFIG_PG_DUMPALL='/usr/bin/pg_dumpall'
  39. #CONFIG_PSQL='/usr/bin/psql'
  40. #CONFIG_GZIP='/bin/gzip'
  41. #CONFIG_BZIP2='/bin/bzip2'
  42. #CONFIG_XZ='/usr/bin/xz'
  43. #CONFIG_MAILX='/usr/bin/mail'
  44. #CONFIG_OPENSSL='/usr/bin/openssl'
  45. # =============================================================
  46. # === ADVANCED OPTIONS (Make sure to RTFMP before changing) ===
  47. #==============================================================
  48. # List of DBNAMES to EXCLUDE if DBNAMES are set to all (must be in " quotes)
  49. CONFIG_DBEXCLUDE="template0"
  50. # Include CREATE DATABASE in backup?
  51. CONFIG_CREATE_DATABASE=yes
  52. # Make a dump of the PostgreSQL globals (ie login roles)
  53. #CONFIG_DUMP_GLOBALS=yes
  54. # Which day do you want weekly backups? (1 to 7 where 1 is Monday)
  55. CONFIG_DOWEEKLY=1
  56. # Choose Compression type. (none, gzip or bzip2)
  57. # Use 'none' if DUMPFORMAT='custom' and your PostgreSQL installation has zlib
  58. # support to allow pg_dump to handle compression at dump time.
  59. CONFIG_COMP=none
  60. # Should the output files be encrypted using symmetric encryption?
  61. # If enabled, you must specify a passphrase to use as the encrpytion key.
  62. CONFIG_ENCRYPT=no
  63. #CONFIG_ENCRYPT_PASSPHRASE=
  64. # Additionally keep a copy of the most recent backup in a seperate directory.
  65. CONFIG_LATEST=yes
  66. # For connections to localhost. Sometimes the Unix socket file must be specified.
  67. CONFIG_SOCKET=
  68. # Using 'custom' is the most flexible format according to PostgreSQL developers.
  69. # NOTE: using the 'tar' format requires sufficient temporary disk space (usually
  70. # in /tmp) to dump an intermediatary copy of each database as part of the
  71. # conversion to tar
  72. # Refer to `man pg_dump` for more information on the 3 options.
  73. CONFIG_DUMPFORMAT='custom'
  74. #CONFIG_DUMPFORMAT='plain'
  75. #CONFIG_DUMPFORMAT='tar'
  76. # umask controls the permissions of created directories and files. The default
  77. # is fairly restrictive (700 for directories, 600 for files). You may like/need
  78. # to relax for your environment.
  79. CONFIG_UMASK=0077
  80. # Command to run before backups (uncomment to use)
  81. #CONFIG_PREBACKUP="/etc/pgsql-backup/pre.sh"
  82. # Command run after backups (uncomment to use)
  83. #CONFIG_POSTBACKUP="/etc/pgsql-backup/post.sh"