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
826 stars 140 forks source link

Allow to disable compression in cluster mode #139

Open prodrigestivill opened 1 year ago

prodrigestivill commented 1 year ago

Allow to disable the gzip compression when using cluster mode YES and better document the cluster mode.

Reported by @JohnTheNerd:

[...] I think what tripped me up is that I enabled POSTGRES_CLUSTER and never removed the -Z6 from POSTGRES_EXTRA_OPTS, which made the script fail. Then I removed that option without re-adding the compress option, which of course created a .sql.gz file that was not gzipped, making me believe it is broken.

Nevertheless, I feel like separating out compression from POSTGRES_EXTRA_OPTS could be good because:

  • It would allow uncompressed pg_dumpall backups.
  • It would allow setting the compression level on pg_dumpall backups.
  • I can see others being confused by something similar, but admittedly this is very subjective. Seeing it's documented right in the README, maybe that is more about my lack of attention than anyone else's confusion smile