dev-master
9999999-dev
The Requires
Wallogit.com
2017 © Pedro Peláez
Automated backup script that pulls the database, compresses, and syncs to an S3 bucket. Designed for Platform.sh, (*1)
You can either clone this repo and use as its own project or you can require it as a dependency into your existing project., (*2)
composer require benjy/platform-backup, (*3)
mounts:
"/backups": "shared:files/backups"
Add environmental variables in Platform.sh. Be sure to add the "env:" prefix., (*4)
Add composer install to .platform.app.yaml, (*5)
hooks:
build: |
composer install --working-dir=./jobs
db_backup:
spec: "0 0 * * *"
cmd: "php ./jobs/db_backup.php"
Note, you might have to update the cmd to point to a different location depending on how you installed., (*6)
Adapted from https://bitbucket.org/snippets/kaypro4/gnB4E, (*7)