Upload large files in parts and record the last confirmed part, so a dropped connection costs you one part and not the whole file. On a hosted Mac you can do this with AWS S3 multipart, with rclone retries, or with a checkpoint script against your own HTTP endpoint. A Figment Intel Mac VM ($25 a month) is enough when the Mac only pushes files that are already prepared.
Which Figment Mac plan fits a large upload?
The Intel Mac VM fits a network-bound push such as video exports, archives or dataset snapshots. It has 4 shared vCPUs, 4GB of RAM and an 80GB SSD (OS included), runs macOS Sequoia, and gives you SSH, remote desktop and administrator access to your own VM. The AWS CLI, rclone and curl install with Homebrew the same as on a laptop. Size the disk to the largest file plus any temporary packaging, because the 80GB includes the OS.
Pick a bigger plan when the Mac does real work before the upload:
| Work before the push | Plan | Price |
|---|---|---|
| Local encoding or packaging that needs Apple silicon or Xcode 26.4 or later | Apple Silicon Mac VM, 4GB RAM, 65GB SSD | $39 a month, $6 a day |
| Heavy rendering, large working sets, or signed CI artifacts that need 48GB RAM and 512GB | Dedicated M4 Pro 48 GB | $349 a month ($299 on a 12-month term) |
For a short transfer, a daily plan ($2 on the Intel VM) costs less than a month. A daily plan covers 24 hours from the order, so size the rental around the longest job you expect.
What should I settle before I write any shell?
Decide these five values first.
| Variable | Purpose |
|---|---|
SOURCE_PATH | Local file or directory to upload |
DEST_URI | Target: s3://bucket/key, gs://bucket/path, or an HTTPS URL |
PART_SIZE_MB | Multipart chunk size. 64 MB is a good default on fast links |
CHECKPOINT_FILE | Records the last successfully uploaded part number |
| Cloud credentials | AWS credentials file, GCP service-account JSON, or an API token |
Keep credentials in the macOS Keychain or in your CI secret manager. If you must use files, write ~/.aws/credentials with chmod 600, or inject AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY at job start from the secret store. Do not dump the whole environment to a file, and do not paste secret literals into shell history.
What is the checkpoint and recovery checklist?
Run the pre-upload list before a long transfer, and the recovery list after any interruption.
Pre-upload
- Free disk space is at least 10% above the source size, for any temp packaging.
- Credentials work:
aws s3 ls s3://your-bucket/returns without error. - Destination bucket and prefix exist and are writable.
- Checkpoint path is writable:
touch "$CHECKPOINT_FILE". - Part size chosen: 64 MB for files over 1 GB on a reliable link, 8 to 16 MB on constrained links.
- If you drive
s3apiby hand, the upload ID fromcreate-multipart-uploadis saved.
After an interruption
- List incomplete uploads:
aws s3api list-multipart-uploads --bucket your-bucket. - List completed parts:
aws s3api list-parts --bucket your-bucket --key your-key --upload-id YOUR_UPLOAD_ID. - Either resume part by part with
s3api upload-partandcomplete-multipart-upload, or start again withaws s3 cp(it opens a new multipart upload). - Verify the final size:
aws s3 ls s3://bucket/keyagainstwc -c < source-file. - Abort stale incomplete uploads older than 48 hours so they stop accruing storage:
aws s3api abort-multipart-upload.
Can the AWS CLI resume an S3 upload?
Not with the high-level aws s3 commands. They perform multipart uploads automatically for large objects, but per the AWS CLI User Guide, "you can't resume a failed upload when using these aws s3 commands". A re-run opens a new multipart upload instead of continuing the old one. To resume a specific upload ID, drive s3api directly.
Set chunk size and parallelism in ~/.aws/config:
[default]
s3 =
multipart_threshold = 64MB
multipart_chunksize = 64MB
max_concurrent_requests = 4
Then upload:
aws s3 cp /path/to/large-file.zip s3://your-bucket/backups/large-file.zip \
--no-progress \
2>> ~/Library/Logs/upload.log
If it fails, re-run. To pick up exactly where the last attempt stopped, list the parts with aws s3api list-parts, upload only the missing part numbers against the same upload ID, then call complete-multipart-upload.
How do I retry uploads with rclone?
Use rclone's retry flags. It supports dozens of backends (S3, GCS, B2, SFTP and more). The rclone global flags include --retries (high-level operation retries), --retries-sleep (the wait between retries) and --low-level-retries (individual HTTP request retries). The S3 chunk size flag is --s3-chunk-size. rclone does not resume an in-progress multipart upload at a byte offset. It retries transfers and, for directory copies, skips files already at the destination with matching size and mtime.
rclone copy /path/to/large-file.zip remote:your-bucket/backups/ \
--s3-chunk-size 64M \
--retries 5 \
--retries-sleep 30s \
--low-level-retries 10 \
--progress \
2>> ~/Library/Logs/rclone-upload.log
Run rclone help flags on your installed version before you trust a copied script, because flag names and defaults change between releases.
How do I resume an upload to my own HTTP endpoint?
Keep the last confirmed part number on disk and resume from it. This works when the destination accepts chunked PUTs. The script stops on the first failure, so a failed job is never counted as complete.
#!/usr/bin/env bash
set -euo pipefail
SOURCE="${1:?Usage: upload.sh <file> <url>}"
DEST_URL="${2:?}"
PART_SIZE=$(( 64 * 1024 * 1024 )) # 64 MB
CHECKPOINT="${SOURCE}.upload_state"
LOG="${HOME}/Library/Logs/upload.log"
TOTAL=$(wc -c < "$SOURCE" | tr -d ' ')
PARTS=$(( (TOTAL + PART_SIZE - 1) / PART_SIZE ))
LAST_PART=0
[[ -f "$CHECKPOINT" ]] && LAST_PART=$(cat "$CHECKPOINT")
echo "$(date -u +%FT%TZ) start $SOURCE bytes=$TOTAL parts=$PARTS resume_from=$LAST_PART" >> "$LOG"
for (( part=LAST_PART; part<PARTS; part++ )); do
OFFSET=$(( part * PART_SIZE ))
HTTP_CODE=$(curl -sS -o /dev/null -w "%{http_code}" \
-X PUT "${DEST_URL}/part?n=${part}&offset=${OFFSET}" \
-H "Content-Type: application/octet-stream" \
--data-binary "@-" \
< <(dd if="$SOURCE" bs="$PART_SIZE" skip="$part" count=1 2>/dev/null))
if [[ "$HTTP_CODE" =~ ^2 ]]; then
echo "$((part + 1))" > "$CHECKPOINT"
echo "$(date -u +%FT%TZ) part $part ok ($HTTP_CODE)" >> "$LOG"
else
echo "$(date -u +%FT%TZ) part $part FAILED ($HTTP_CODE) stopping" >> "$LOG"
exit 1
fi
done
rm -f "$CHECKPOINT"
echo "$(date -u +%FT%TZ) complete $SOURCE" >> "$LOG"
Adapt the URL, headers and completion call to your API. The checkpoint file persists across runs on the same host, so a re-run picks up at the last confirmed part. The dd form uses bs=$PART_SIZE skip=$part count=1, which is far faster than bs=1 with a large skip.
How much does checkpointing save?
It limits a restart to one part. Take a 42 GB archive on a link that holds 200 Mbit/s, with PART_SIZE = 64 MB:
- Parts:
ceil(42 * 1024 / 64) = 672. - Transfer time at 200 Mbit/s:
42 * 1024 * 8 / 200 = 1720 s, about 28.7 minutes, ignoring TLS and per-request overhead. - A single-part upload that drops at 90% re-sends about 38 GB. With 64 MB parts and a checkpoint, a restart re-sends at most one part, about 64 MB or roughly 2.6 seconds of the same link.
These are arithmetic estimates, not measurements. In practice your limits are the link, the API's per-part rate limits and the destination's part-size minimums (S3 requires at least 5 MB per part except the last).
How do I schedule a nightly upload with launchd?
Put a LaunchAgent plist in ~/Library/LaunchAgents/com.example.nightly-upload.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.example.nightly-upload</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/Users/agent/bin/upload.sh</string>
<string>/Users/agent/exports/nightly.zip</string>
<string>https://api.example.com/uploads/nightly</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key><integer>2</integer>
<key>Minute</key><integer>0</integer>
</dict>
<key>StandardOutPath</key>
<string>/Users/agent/Library/Logs/nightly-upload.log</string>
<key>StandardErrorPath</key>
<string>/Users/agent/Library/Logs/nightly-upload-error.log</string>
</dict>
</plist>
Load it with launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.example.nightly-upload.plist. See Apple's Creating launchd Jobs for StartCalendarInterval, and read the launchd.plist man page on your macOS version for behavior around sleep and missed intervals.
How do I start, or move an existing upload job?
To start fresh, pick a plan on Figment Mac hosting, connect over SSH, install the AWS CLI or rclone with Homebrew, load credentials from your secret manager, and test a 1 GB transfer before you point the real job at the Mac.
To migrate from another host, copy the upload script and the launchd plist, re-register credentials on the new Mac, run a small test upload end to end, then switch the scheduler and point your producers at the new destination.
Related guides: