Backups
Automate backup of the database and filesystem to S3.
Automated off-site backups to S3 are easily configured using the backup
container. Simply add the following configuration to your docker-compose.override.yml
file to backup the database and the root project folder:
backup:
build: docker/backup
links:
- db
volumes:
- ./docker/backup/logs:/var/log:delegated
- ./www:/var/www/html:cached
environment:
- DOMAIN=localhost
- S3_ACCESS_KEY=my-aws-access-key
- S3_ACCESS_SECRET=my-aws-access-secret
- S3_BUCKET=my-s3-bucket
- MYSQL_HOST=db
- MYSQL_USER=docker
- MYSQL_PASSWORD=docker
- MYSQL_DATABASE=dev
- DIRECTORY=/var/www/html
You can configure the backup schedule by editing ./docker/backup/templates/crontab
, by default (and when enabled), the backups will run daily at 03:00 UTC.
Under the hood, the backup is powered by the Shed CLI tool.
Last updated
Was this helpful?