Add handling compression argument for postgres #280
Conversation
| "zstd": "zst", | ||
| } | ||
| ) | ||
|
|
There was a problem hiding this comment.
Remove this format check, allows any values.
We do not need to do to mush limit, user can follow the PostgreSQL document to do.
There was a problem hiding this comment.
@huacnlee In general I agree, but it is beneficial to set the correct file extension. This saves hassle while restoring from the backup when the file is named accordingly. What do you think? How do you propose to handle file extension if we do not have this mapping?
As an alternative, we can ofc add another config param with file extension if you prefer :-)
There was a problem hiding this comment.
@huacnlee I would appreciate if you could share your opinion. I need this compression param for backing up large (>100GB) databases. If there is no hope to merge and release it soon, I will need to base it on the fork. Thanks!
There was a problem hiding this comment.
Remove this check, then I will going to merge this PR. I want Gobackup to not too many logic.
There was a problem hiding this comment.
Actually, no this PR change, we also can use args option for this case, any arguments that pg_dump supports can assign by args option.
There was a problem hiding this comment.
No @huacnlee, we cannot use args. Look at this PR pls, it changes the way the dump file name is constructed. This is the reason why the map is added.
There was a problem hiding this comment.
I see, only use args we can't change the output filename.
|
Thanks. |
In relation to #208, for postgres database
pg_dumpsupports--compressargument. This PR adds handling ofcompressfrom config, along with setting the correct file name. It saves disk space.The allowed values for
compressare:gzip,lz4andstd. The compression level can be set as:gzip:3.