Skip to content
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

Use 7z built-in function to split the dumpped mongodb and delete the original file? #27

Open
PeterDaveHello opened this issue Feb 13, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@PeterDaveHello
Copy link
Contributor

PeterDaveHello commented Feb 13, 2022

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

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 ;)

@PeterDaveHello PeterDaveHello added the enhancement New feature or request label Feb 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant