PostgreSQL & S3 Backup
PostgreSQL database with a CRON job that uploads a backup to S3
S3 Backup
eeshugerman/postgres-backup-s3:16
Just deployed
Postgres
railwayapp-templates/postgres-ssl:latest
Just deployed
/var/lib/postgresql/data
PostgreSQL & S3 Backup
This template contains a PostgreSQL database and a CRON job that automatically creates a backup and uploads it to S3.
What you need
- AWS Account with Access Key
- S3 Bucket
Variables
Name | Description | Optional | Default value |
---|---|---|---|
SCHEDULE | CRON schedule at which the backup is run. The schedule also supports non standard values like @hourly, @daily, @weekly, @monthly and @yearly. If left empty the backup will be run immediately and the container will stop | Yes | |
BACKUP_KEEP_DAYS | The number of days to keep a backup file for. If left empty backups will NEVER be automatically deleted | Yes | |
Passphrase | Passphrase to be used when encrypting the backup using GPG. If left empty NO encryption will be done | Yes | |
S3_REGION | The region the AWS S3 bucket was created in | No | |
S3_BUCKET | The name of the bucket to upload your files into | No | |
S3_ACCESS_KEY | The ID of the your access key used to upload files into the S3 bucket | No | |
S3_SECRET_ACCESS_KEY | The secret key of your AWS access key | No | |
S3_PREFIX | The prefix to be used when uploading the backup to S3. If left empty the backup will be uploaded to the root of the bucket | No | backup |
Template Content
S3 Backup
eeshugerman/postgres-backup-s3:16S3_BUCKET
The name of the bucket to upload your files into
S3_REGION
The region the AWS S3 bucket was created in
S3_ACCESS_KEY_ID
The ID of the your access key used to upload files into the S3 bucket
S3_SECRET_ACCESS_KEY
The secret key of your AWS access key