Last active
October 18, 2017 09:05
-
-
Save jrx/28e57189bf932dc3d6554a9800c9bc05 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "pgdump", | |
"run": { | |
"cpus": 0.5, | |
"mem": 512, | |
"disk": 0, | |
"cmd": "pg_dump --dbname=$PGDB --host=$PGHOST --port=$PGPORT --username=$PGUSER > $BACKUP_FOLDER/$PGHOST-$PGDB-`date +\\%Y-\\%m-\\%d-\\%H-\\%M-\\%S`.sql && gzip $BACKUP_FOLDER/*", | |
"docker": { | |
"image": "postgres:9.6" | |
}, | |
"env": { | |
"BACKUP_FOLDER": "/var/lib/pg_backup", | |
"PGPASSWORD": "password", | |
"PGUSER": "admin", | |
"PGHOST": "postgresql.marathon.l4lb.thisdcos.directory", | |
"PGPORT": "5432", | |
"PGDB": "defaultdb" | |
}, | |
"volumes": [ | |
{ | |
"containerPath": "/var/lib/pg_backup", | |
"hostPath": "/var/lib/pg_backup", | |
"mode": "RW" | |
} | |
] | |
}, | |
"schedules": [ | |
{ | |
"id": "default", | |
"enabled": true, | |
"cron": "0 3 * * *", | |
"concurrencyPolicy": "ALLOW" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment