Skip to content

Latest commit

 

History

History
31 lines (17 loc) · 926 Bytes

README.md

File metadata and controls

31 lines (17 loc) · 926 Bytes

Postgres Minio backups

A Docker to backup your PostgreSQL database to Minio via a cron.

Overview

The template use Docker and Bash Scripting to dump your PostgreSQL data to a file and then upload the file to Minio.

Deploy on Railway

Configuration

  • MINIO_ENDPOINT - Minio endpoint. Example: http://minio:9000.

  • ACCESS_KEY - Minio access key.

  • SECRET_KEY - Minio secret key.

  • MINIO_BUCKET - Minio bucket. Example my-bucket.

  • BACKUP_DATABASE_URL - The connection string of the database to backup. Example: "postgresql://username:password@host:port/database"

  • CRON_SCHEDULE - The cron schedule to run the backup on. Example: 0 5 * * * the cron runs at 5 AM every day

Restore data

Restore your data to the target database with pg_restore

pg_restore -v -d postgres_connection_string filename.bak