mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-11-02 18:17:11 +09:00
A gzip.open() handle passed as a subprocess stream hands the child the raw fd, so mysqldump/pg_dump wrote plain SQL inside a gzip header and restores piped compressed bytes into mysql/psql. Backups, policies and pre-deploy snapshots all produced files that could not be restored. run_to_gzip/run_from_gzip pump the bytes through Python instead, with stderr in a temp file so a noisy child can't deadlock the pipe. The two hand-rolled db_sync dump pipes move onto them too.
2 lines
3 B
Plaintext
2 lines
3 B
Plaintext
23
|