-
Notifications
You must be signed in to change notification settings - Fork 90
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
postgresql_db module zcat error restoring sql.gz
files
#475
Comments
@alanbchristie hello, thanks for reporting the issue! In the error message, we see that zcat appends
After googling a bit, found out that we are not alone, see this stack overflow post. It's zcat MacOS specific behavior. Not sure, what we can do with this. Any ideas would be appreciated |
Wow - that is frustrating. My opinion? There are a number of options I guess: -
I think it's A or B? |
@alanbchristie thanks for the options! I'm personally inclining to We could, say:
@alanbchristie @hunleyd @betanummeric @aleksvagachev what do you folks think? |
The particular issue can probably solved quite easily by giving the compressed file on stdin to the uncompressor, instead of a command line argument. This should be tested carefully with all supported compressors though. Further, I think we should offer a module argument to specify a custom (de)compression command that overrides the file-suffix-based guesswork. |
SUMMARY
When I use the
dump
option of thepostgresql_db
module to create a.sql.gz
file, therestore
mechanism generates an error claiming the file does not exist. It looks like a problem with the use of the underlyingzcat
utility because it does work if thetarget
does not usegz
compression, e.g. if the target is/tmp/dump.sql
.ISSUE TYPE
COMPONENT NAME
module:
community.postgresql.postgresql_db
state:
restore
ANSIBLE VERSION
COLLECTION VERSION
N/A
CONFIGURATION
OS / ENVIRONMENT
Running on the control machine: -
OS:
macOS Big Sur Version 11.7.6
STEPS TO REPRODUCE
Dump a PostgreSQL DB to a
sql.gz
file: -And then try and restore with: -
EXPECTED RESULTS
restore
should workACTUAL RESULTS
restore
fails claiming that there is no such file or directory.The text was updated successfully, but these errors were encountered: