All Templates / Automation
Database S3 backups
A simple script to automatically back up multiple databases to S3.
database-backups-s3
lukeliasi/database-backups-s3
Just deployed
This script provides a simple all-in-one automated way to back up your databases to AWS S3.
Supported databases:
postgres
mysql
mongodb
Create a .env
file in the root directory with the following variables:
RUN_ON_STARTUP=true
CRON=0 0 * * *
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_S3_BUCKET=
AWS_S3_REGION=
AWS_S3_ENDPOINT=
DATABASES="mysql://user:password@host:port/database,postgresql://user:password@host:port/database,mongodb://user:password@host:port"
Key | Description | Optional | Default Value |
---|---|---|---|
DATABASES | Comma-separated connection strings list of database URIs that should be backed up. | No | [] |
RUN_ON_STARTUP | Boolean value that indicates if the script should run immediately on startup. | Yes | false |
CRON | Cron expression for scheduling when the backup job will run for all databases. See Crontab.guru for help setting up schedules. | Yes | |
AWS_ACCESS_KEY_ID | AWS access key ID. | No | |
AWS_SECRET_ACCESS_KEY | AWS secret access key. | No | |
AWS_S3_BUCKET | Name of the S3 bucket. | No | |
AWS_S3_REGION | Region of the S3 bucket. | No | |
AWS_S3_ENDPOINT | Endpoint for the S3 service. | No |
Template Content
database-backups-s3
lukeliasi/database-backups-s3DATABASES
Comma-separated connection strings list of database URIs that should be backed up. Example: mysql://user:password@host:port/database,postgresql://user:password@host:port/database,mongodb://user:password@host:port
AWS_S3_BUCKET
Name of the S3 bucket to back up your databases to.
AWS_S3_REGION
Region of the S3 bucket
RUN_ON_STARTUP
Boolean value that indicates if the script should run immediately on script startup.
AWS_S3_ENDPOINT
AWS endpoint for the S3 service
AWS_ACCESS_KEY_ID
Your AWS access key ID
AWS_SECRET_ACCESS_KEY
Your AWS secret access key
Details
Luke Liasi
Created on Aug 9, 2023
50 total projects
14 active projects
100% success on recent deploys
JavaScript, Dockerfile
Automation
More templates in this category
Postgres S3 backups
A simple NodeJS app to back up your PostgreSQL database to S3 via a cron
Railway Templates
794
Tier
A single tool to configure,orchestrate and manage your entire pricing stack
16