-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix compression in pg_dump and make it optional #132
Conversation
- The `pg_dump` call never actually compressed the data, only `pg_dumpall` did. This commit fixes that. - Made compression optional, as there are a few to not want to compress the backups.
Thanks for your time. Also I want to add that currently As a note, I would like to link this PR to #33 and #45, but not sure how would it affect them. |
I see, I think what tripped me up is that I enabled Nevertheless, I feel like separating out compression from
Would you like me to change the PR accordingly? I don't know why the tests fail, I will look at that, but if I'm committing changes anyway I may aswell do that first. |
It would be nice to also enable usage of other compression like tar to match pgadmin?
|
@fritz-net tar backups are already supported. |
@prodrigestivill I did not find anything about the tar thing yet. :( please could u give me a hint? search did only show me that tar is linked within debian docker As far is I am aware the following pipe to gzip would mess it up anyway? docker-postgres-backup-local/backup.sh Line 93 in 19ef5fb
zip was just an example |
@fritz-net for gzipped tarball you should not use POSTGRES_CLUSTER mode please refer to #138 from Q/A, if this don't solve your case, please respond there or open another discussion in Q/A. @JohnTheNerd I close this PR to avoid further noise. I open an issue #139 with your request and I will try to implement it whenever I have time. Thanks for all the effort. |
The
pg_dump
call never actually compressed the data, onlypg_dumpall
did. This PR fixes that.Made compression optional, as there are a few reasons to not want to compress the backups (such as external backup solutions implementing deduplication for you). This is done via an environment variable named
COMPRESS_BACKUPS
which defaults to compress, and is documented in the README.