Skip to content

Instantly share code, notes, and snippets.

View bbcoimbra's full-sized avatar

Bruno Coimbra bbcoimbra

View GitHub Profile
@bbcoimbra
bbcoimbra / backup_to_s3.sh
Created August 9, 2017 19:43
Database backup to S3 with pg_dump and aws-cli
#!/bin/bash
#
# Author: Bruno Coimbra <[email protected]>
#
# Backups database located in DB_HOST, DB_PORT, DB_NAME
# and can be accessed using DB_USER. Password should be
# located in $HOME/.pgpass and this file should be
# chmod 0600[1].
#
# Target bucket should be set in BACKUP_BUCKET variable.