Help Center/ Object Storage Service/ Tools Guide/ obsutil/ Object Commands/ Deleting a Multipart Upload Task
Updated on 2024-09-03 GMT+08:00

Deleting a Multipart Upload Task

Function

  • You can use this command to delete a multipart upload task in a specified bucket by using the multipart upload ID.
  • You can also use this command to delete multipart upload tasks in batches based on a specified object name prefix.

Command Line Structure

  • In Windows
    • Deleting a single multipart upload task
      obsutil abort obs://bucket/key -u=xxx [-f] [-fr] [-o=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
    • Deleting multipart upload tasks in batches
      obsutil abort obs://bucket[/key] -r [-f] [-o=xxx] [-j=1] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
  • In Linux or macOS
    • Deleting a single multipart upload task
      ./obsutil abort obs://bucket/key -u=xxx [-f] [-fr] [-o=xxx] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]
    • Deleting multipart upload tasks in batches
      ./obsutil abort obs://bucket[/key] -r [-f] [-o=xxx] [-j=1] [-config=xxx] [-e=xxx] [-i=xxx] [-k=xxx] [-t=xxx]

Examples

  • Take the Windows OS as an example. Run the obsutil abort obs://bucket-test/key -u=xxx -f command to delete a single multipart upload task.
    obsutil abort obs://bucket-test/key -u=xxx -f
    
    Abort multipart upload [key] in the bucket [bucket-test] successfully!
  • Take the Windows OS as an example. Run the obsutil abort obs://bucket-test -r -f command to delete all multipart upload tasks in the bucket in batches.
    obsutil abort obs://bucket-test -r -f
    
    Listing multipart uploads to abort...
    Aborting progress:[================================================] 100.00% 3s
    Succeed count is:   12        Failed count is:    0
    Metrics [max cost:264 ms, min cost:54 ms, average cost:119.33 ms, average tps:19.70]
    Task id is: 0b34b1fa-b015-4313-a216-0fd5b4fffa1c

Parameter Description

Parameter

Optional or Mandatory

Description

bucket

Mandatory

Bucket name

key

Mandatory for deleting a multipart upload task.

Optional for deleting multipart upload tasks in batches.

Indicates the object name involved in a multipart upload task to be deleted, or the name prefix of the objects involved in multipart upload tasks to be deleted in batches.

NOTE:

If this parameter is left blank when deleting multipart upload tasks in batches, all multipart upload tasks in the bucket are deleted.

u

Mandatory for deleting a single multipart upload task (additional parameter)

ID of the multipart upload task to be deleted

NOTE:

You can obtain the value of this parameter from Listing Multipart Upload Tasks.

fr

Optional for deleting a single multipart upload task (additional parameter)

Generates an operation result list when deleting a multipart upload task.

f

Optional (additional parameter)

Runs in force mode.

r

Mandatory for deleting multipart upload tasks (additional parameter)

Deletes multipart upload tasks in batches based on a specified object name prefix.

j

Optional for deleting multipart upload tasks (additional parameter)

Indicates the maximum number of concurrent tasks for deleting multipart uploads in batches. The default value is the value of defaultJobs in the configuration file.

NOTE:

The value is ensured to be greater than or equal to 1.

o

Optional (additional parameter)

Indicates the folder where operation result lists reside. After the command is executed, result lists (possibly including success and failure files) are generated in the folder. The default value is .obsutil_output, the subfolder in the home directory of the user who executes obsutil commands.

NOTE:
  • The naming rule for result lists is as follows: abort_{succeed | failed}_report_time_TaskId.txt
  • By default, the maximum size of a single result list is 30 MB and the maximum number of result lists that can be retained is 1024. You can set the maximum size and number by configuring recordMaxLogSize and recordBackups in the configuration file.

config

Optional (additional parameter)

User-defined configuration file for executing a command. For details about parameters that can be configured, see Configuration Parameters.

e

Optional (additional parameter)

Specifies the endpoint.

i

Optional (additional parameter)

Specifies the user's AK.

k

Optional (additional parameter)

Specifies the user's SK.

t

Optional (additional parameter)

Specifies the user's security token.

Response

Refer to Response for uploading an object.