b2_unfinished_uploads
Detect abandoned multipart uploads that silently consume storage. Returns count, oldest upload age, and wasted bytes so you can clean up or apply a lifecycle rule.
Instructions
Find abandoned multipart uploads that silently consume storage in a bucket. For 'bucket bloat', 'stuck/incomplete uploads', 'wasted storage'. Returns count, oldest upload age, and wasted bytes. Give the bucket by name or bucketId. Live listing, bounded by max_uploads and an internal time budget — on a very bloated bucket it returns a truncated result (and wasted_gb may be a lower bound) and recommends a lifecycle rule.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bucket | Yes | Bucket name or bucketId to inspect. | |
| max_uploads | No | Safety cap on how many unfinished uploads to scan (default 1000, max 10,000). A bucket bloated with abandoned uploads would otherwise trigger an unbounded walk plus a per-upload parts fan-out that times out. If the cap or an internal time budget is hit, the result is truncated and wasted_gb may be a lower bound — add a lifecycle rule to auto-cancel unfinished large files. | |
| older_than_days | No | Only count uploads started more than this many days ago (optional). |