Skip to content

Instantly share code, notes, and snippets.

@avoinea
Created June 13, 2016 08:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avoinea/fef18413ed4ae93fc97d70fb2e0be256 to your computer and use it in GitHub Desktop.
Save avoinea/fef18413ed4ae93fc97d70fb2e0be256 to your computer and use it in GitHub Desktop.
# - Archiving -
archive_mode = on # allows archiving to be done
# (change requires restart)
#archive_command = 'test ! -f /var/lib/pgsql/backup_in_progress || (test ! -f /var/lib/pgsql/archive/%f && cp %p /var/lib/pgsql/archive/%f)' # command to use to archive a logfile segment
archive_command = 'rsync -a %p postgres@db-pg-prod-staging.cvps.eea.europa.eu:/var/lib/pgsql/archive/%f'
# placeholders: %p = path of file to archive
# %f = file name only
# e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f'
archive_timeout = 600 # Let's keep us max 10minutes away from the master
# number of seconds; 0 disables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment