Skip to content

mysteriumnetwork/pgbackup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pgbackup

Postgres Database backup to remote S3 storage

Workflow

  1. Creates archived Database dump file
  2. Makes an upload of files to remote S3
  3. Sends a heartbeat upon successful completion of work cycle

Installation

Binaries

Pre-built binaries are available here.

Build from source

Alternatively, you may run it locally by building an image under the root directory

docker build . -t pgbackup

Recognized environment variables

  • PG_HOST - Postgres Database server hostname
  • PG_PORT - Postgres Database server port
  • PG_DB - Database name to be backed up
  • PG_USER - Database user name to make a backup with
  • PG_PASS - Database user password to make a backup with
  • AWS_S3_BUCKET - Aws S3 or compatible S3 storage bucket
  • AWS_KEY_ID - Aws S3 or compatible S3 Access Key Id
  • AWS_KEY - Aws S3 or compatible S3 Access Key
  • HEARTBEAT_URL - Heartbeat Url to call upon successful completion of the backup
  • AWS_ENDPOINT_FILE - (optional) S3 compatible configuration endpoint file (example here)