prodrigestivill / docker-postgres-backup-local

Backup PostgresSQL to local filesystem with periodic backups and rotate backups.
https://hub.docker.com/r/prodrigestivill/postgres-backup-local
MIT License
829 stars 140 forks source link

BACKUP_ON_START doesn't seem to work #159

Closed TiraelSedai closed 1 month ago

TiraelSedai commented 1 month ago

Here's part of my compose:

  backup:
    container_name: immich_db_dumper
    image: prodrigestivill/postgres-backup-local
    restart: unless-stopped
    env_file:
      - .env
    environment:
      POSTGRES_HOST: database
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      BACKUP_ON_START: TRUE
    volumes:
      - D:/Immich/db_dumps:/backups
    depends_on:
      - database

and here are the logs after start:

2024-09-16 12:55:40 2024/09/16 09:55:40 Running version: v0.0.11
2024-09-16 12:55:40 2024/09/16 09:55:40 new cron: @daily
2024-09-16 12:55:40 2024/09/16 09:55:40 Opening port 8080 for health checking
TiraelSedai commented 1 month ago

It is apparently case sensitive changing it to BACKUP_ON_START: "TRUE" did the trick for me, but I'd suggest making it lowercase or even 1 instead of true for convenience

(feel free to close otherwise)

prodrigestivill commented 1 month ago

Moved the feature request to a new issue.

Thanks for reporting.