One Sketch Away

Oci Object Storage Multipart Cleanup

OCI Object Storage: Cleaning Up Orphaned Multipart Uploads

Background

I use OCI Object Storage as a target for periodic backups.
The backups are generated by a scheduled routine, uploaded to Object Storage, and older backups are automatically deleted after a fixed retention period using prefix-based lifecycle logic implemented in my own scripts.

This setup had been working reliably.

One day, while checking the Object Storage console, I noticed a warning:

Uncommitted multipart uploads count: More than 1,000 uploads

What made this puzzling was:

This post documents what that warning actually means and how to safely clean up those orphaned uploads.


What Are “Uncommitted Multipart Uploads”?

Object Storage uses multipart uploads automatically for large files.

A multipart upload works in two phases:

  1. Upload object parts
  2. Commit the upload to assemble the final object

If an upload fails before the commit step (for example due to a crash, timeout, restart, or transient network issue), the uploaded parts remain as an incomplete multipart upload.

Key characteristics:

Once the number grows large, OCI displays a warning.


Why These Uploads Are Invisible in the Console

Object Storage is a flat namespace.
“Folders” are simply prefixes that exist only when at least one object is present.

Because incomplete multipart uploads never produce a final object:

The only way to see them is via multipart upload listing, which is not always exposed in the OCI Console.


Step 1: Set Up OCI CLI

To investigate further, I used the OCI CLI.

oci setup config

Verification:

oci os ns get

Step 2: List Multipart Uploads

To list all incomplete multipart uploads:

oci os multipart list   --bucket-name obj-store   --namespace <namespace>   --all

Sample output:

{
  "object": "backup/2025/09/06/.../DATA_EXPORT.dmp",
  "upload-id": "f8544f02-67ba-2112-15fb-a8df3448457a",
  "time-created": "2025-09-06T22:00:55Z"
}

Important detail:

The object field represents the intended object name, not an actual file.


Step 3: Is It Safe to Delete These?

Yes — always.

Aborting a multipart upload:


Step 4: Abort a Single Multipart Upload (Manual Test)

/path/to/oci os multipart abort   --bucket-name obj-store   --namespace <namespace>   --object-name "backup/2025/09/06/.../DATA_EXPORT.dmp"   --upload-id f8544f02-67ba-2112-15fb-a8df3448457a   --force

Step 5: Generate Cleanup Commands for Review

oci os multipart list   --bucket-name obj-store   --namespace <namespace>   --all   --query "data[].{object:object,upload_id:\"upload-id\"}"   --output json | jq -r '
  .[] |
  "echo /path/to/oci os multipart abort --bucket-name obj-store --namespace <namespace> --object-name \"" +
  .object +
  "\" --upload-id " +
  .upload_id +
  " --force"
'

Lessons Learned

  1. Multipart uploads can fail silently
  2. Orphaned uploads are invisible in the bucket view
  3. OCI does not auto-clean multipart uploads
  4. CLI access is essential for Object Storage hygiene
  5. Periodic cleanup is a useful safety net

Closing Thoughts

This issue wasn’t about missing data — it was about invisible leftovers.

If you use OCI Object Storage for large uploads, understanding multipart upload behavior and cleanup is essential for long-term operational hygiene.