Skip to content

Instantly share code, notes, and snippets.

@bahamat
Created February 17, 2020 16:24
Show Gist options
  • Save bahamat/f0bc1bd3897bdec356774cc1816d2081 to your computer and use it in GitHub Desktop.
Save bahamat/f0bc1bd3897bdec356774cc1816d2081 to your computer and use it in GitHub Desktop.
Manta MPU multi-part upload example
#!/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