mirror of
https://github.com/Mak5er/Downloader-Bot
synced 2026-11-26 17:18:04 +08:00
Add postgres, db-init, and backup services to docker-compose. Migrate database from Neon DB to self-hosted PostgreSQL 17. - postgres:17-alpine with healthcheck and persistent volume - db-init: auto-restore from local dump or Backblaze B2 on first start - backup: scheduled pg_dump with B2 upload (daily at 3am) - Host-side scripts: backup.sh, restore.sh, cron-backup.sh - Fixed dynamic table ownership in restore (no hardcoded table names) - Fixed pg_restore to use docker cp instead of stdin pipe
11 lines
347 B
Bash
11 lines
347 B
Bash
# Backup Configuration
|
|
# Copy this to .env.backup and fill in your values
|
|
|
|
# Backblaze B2 credentials
|
|
B2_ACCOUNT_ID=your_key_id
|
|
B2_ACCOUNT_KEY=your_app_key
|
|
|
|
# Restic repository (Backblaze B2)
|
|
RESTIC_REPOSITORY=s3:s3.us-east-005.backblazeb2.com/your-bucket-name
|
|
RESTIC_PASSWORD_FILE=/Users/mak5er/Dev/python/Downloader-Bot/scripts/.restic_password
|