Skip to content

Instantly share code, notes, and snippets.

@herval
Last active May 13, 2016 05:00
Show Gist options
  • Save herval/87a9505d002920231270 to your computer and use it in GitHub Desktop.
Save herval/87a9505d002920231270 to your computer and use it in GitHub Desktop.
Daily Postgres Backup from Tutum to S3
backup:
image: 'borja/dockup:latest'
environment:
- AWS_ACCESS_KEY_ID=<SET ME>
- AWS_DEFAULT_REGION=<SET ME>
- AWS_SECRET_ACCESS_KEY=<SET ME>
- BACKUP_NAME=<SET ME>
- PATHS_TO_BACKUP=/var/lib/postgresql/data
- S3_BUCKET_NAME=<SET ME>
restart: on-failure
roles:
- global
tags:
- <MY SERVER TAGS>
volumes_from:
- postgres
cron:
image: 'sillelien/tutum-cron:latest'
environment:
- 'BACKUP_CRON_SCHEDULE=0 0 * * *'
links:
- backup
roles:
- global
tags:
- <SET ME>
postgres:
image: 'postgres:latest'
tags:
- <SET ME>
volumes:
- '/var/lib/postgresql/data'
@ericraio
Copy link

Awesome!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment