CVE-Search-Docker
CVE-Search-Docker copied to clipboard
Use 7z built-in function to split the dumpped mongodb and delete the original file?
https://github.com/cve-search/CVE-Search-Docker/blob/586d5c4aa63b495d453043faa8e16bacec750288/docker/files/mongodb/data_dump_compress.sh#L8-L13
7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on db_dump.7z ./dump
split -b 50M db_dump.7z "db_dump_part"
rm -rf ./dump
rm -rf ./db_dump.7z
I think we can replace the above commands with a single one:
7z -v50m a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on db_dump.7z -sdel ./dump
Not sure if you'd like to accept the change and I'd prepare the pull request ;)