Created
February 17, 2020 16:24
-
-
Save bahamat/f0bc1bd3897bdec356774cc1816d2081 to your computer and use it in GitHub Desktop.
Manta MPU multi-part upload example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# MPU parts need to be minimum 5MB, except the last part. | |
split -b 5m file part. | |
# Create MPU transaction | |
mpu_id=$(mmpu create ~~/stor/file) | |
# Upload each part | |
part0=$(mmpu upload -f part.aa "$mpu_id" 0) | |
part1=$(mmpu upload -f part.ab "$mpu_id" 1) | |
# Commit MPU, which will reconstitute the file in the originally selected location | |
mmpu commit "$mpu_id" "$part0" "$part1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment