Abort a Multipart Upload

Prev Next

After a multipart upload is aborted, no additional parts can be uploaded using the upload ID of the multipart upload. The storage consumed by any previously uploaded parts will be freed. To verify that all parts have been removed, see List Uploaded Parts for a Specific Multipart Upload.

s3cmd [-c CONFIGFILE] abortmp s3://BUCKET/OBJECT ID

CONFIGFILE

Configuration file. Defaults to $HOME/.s3cfg

BUCKET

Name of bucket to which object is being uploaded

OBJECT

Name of object which started uploading as multipart upload

ID

ID of the multipart upload

Example

If we kill the upload process mid-upload (ctrl-C), the upload ID is provided:

upload: 'Big.zip' -> 's3://mybucket/Big.zip'  [part 5 of 16, 500MB] [1 of 1]
  13041664 of 524288000     2% in  109s   116.48 kB/s^CERROR: 
Upload of 'Big.zip' part 5 failed. Use
  s3cmd abortmp s3://mybucket/Big.zip Y8CYFHWCmnT6WUIw9nPTyU1AyseDrvsXhroXqVHIfA5AaTsUWw01Y8LZgx5H.8JJybYtMUUsW2GBXByAGiZJ_lc3qtBDa2WO5x2F6397UHZSBwaj61P4pkw67zQF63nM
to abort the upload, or
  s3cmd --upload-id Y7CYFHWCmnT6WUIw9nPTyU1AyseDrvsXhroXqVHIfA5AaTsUWw01Y8LZgx5H.8JJybYtMUUsW2GBXByAGiZK_lc3qtBDa2WO5x2F6397UHZSBwaj61P4pkw67zQF63nM put ...
to continue the upload.

Now we can use this upload ID to abort the upload:

$ s3cmd -c vast.s3cfg abortmp s3://mybucket/Big.zip Y8CYFHWCmnT6WUIw9nPTyU1AyseDrvsXhroXqVHIfA5AaTsUWw01Y78LZgx5H.8JJybYtMUUsW2GBXByAGiZK_lc3qtBDa2WO5x2F6397UHZSBwaj61P4pkw67zQF63nM