Skip to content

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

Description

@PeterDaveHello

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions