Object Storage Service (OSS) provides various methods to access and manage objects. To improve operational efficiency, you can perform the operations described in this topic to manage objects at a time. For example, you can upload, download, replicate, and delete multiple objects at a time.
Upload multiple objects at a time
You can use the following methods to upload multiple objects at a time:
ossimport
Use ossimport to migrate data to OSS from data sources, such as local servers, OSS, and third-party cloud storage services like Amazon Simple Storage Service (Amazon S3), Azure Blob, and Tencent Cloud Object Storage (COS). ossimport is especially suitable for the migration of large amounts of data. For more information, see Overview.
ossutil
Upload multiple objects to OSS at a time by including the -r(--recursive) option in the cp command of ossutil. For more information, see Upload objects.
ossbrowser
Use ossbrowser to select multiple objects at a time and upload them to OSS. For more information, see Use ossbrowser.
OSS console
Upload multiple objects to OSS at a time by using the OSS console. For more information, see Simple upload.
ZIP package decompression
Configure decompression rules, compress multiple local files into a ZIP package, and then upload the ZIP package to OSS. Then, Function Compute is triggered to decompress the ZIP package and upload the decompressed files to OSS. For more information, see ZIP package decompression.
Download multiple objects at a time
If you want to download multiple objects by object information, such as the last modified time, filter matching objects based on an inventory and use one of the following methods to download the objects.
You can use the following methods to download multiple objects at a time:
ossutil
Include the -r(--recursive) option in the cp command of ossutil to download objects in a specific directory from OSS to a local device. For more information, see Download objects.
ossbrowser
Use ossbrowser to select multiple objects or directories and download them to your local device at a time. For more information, see Use ossbrowser.
OSS console
Use the OSS console to download multiple objects to your local device at a time. For more information, see Simple download.
Package and then download objects
Use Function Compute with OSS to package objects and then download the package to a local device. For more information, see Use Function Compute to download multiple objects as a package.
Copy multiple objects at a time
You can use the following methods to copy multiple objects at a time:
CRR
Use cross-region replication (CRR) to replicate objects whose names contain a specific prefix at a time. You can choose whether to synchronize historical data and whether to synchronize deletion operations. For more information, see CRR within the same account.
ossutil
Replicate multiple objects at a time from the specified directory to another directory in the same bucket or to another bucket within the same account by including the -r(--recursive) option in the cp command of ossutil. For more information, see Copy objects.
ossbrowser
Use ossbrowser to select multiple directories or objects, and copy selected objects to another directory in the same bucket or to another bucket in the same account. For more information, see Use ossbrowser.
Delete multiple objects at a time
You can use the following methods to delete multiple objects at a time:
You cannot recover deleted objects. Exercise caution when you perform this operation.
OSS SDK
Use SDKs to delete multiple objects at a time.
For examples of deleting objects by using OSS SDKs for other programming languages, see Overview.
OSS API
Call the DeleteMultipleObjects operation to delete multiple objects at a time. For more information, see DeleteMultipleObjects.
ossutil
Delete multiple objects whose names contain a specific prefix by including the -r(--recursive) option in the rm command of ossutil. For more information, see rm.
ossbrowser
Use ossbrowser to select multiple objects or directories and delete them at a time. For more information, see Use ossbrowser.
OSS console
Use the OSS console to delete multiple objects at a time. For more information, see Delete objects.
You can also directly delete a directory. All objects in the directory are deleted at the same time.
Use the OSS console to delete multiple parts at a time. For more information, see Delete parts.
Lifecycle rules
Configure lifecycle rules to automatically delete multiple objects at a time. For more information, see Lifecycle rules based on the last modified time.
Change the storage classes of multiple objects at a time
You can use the following methods to change the storage classes of multiple objects at a time:
ossutil
Change the storage classes of specified objects at a time by including the -r(--recursive) option in the set-meta command of ossutil. For more information, see set-meta (manage object metadata).
Lifecycle rules
Configure lifecycle rules to automatically change the storage classes of multiple objects at a time. For more information, see Lifecycle rules based on the last modified time.
Change the access control lists (ACLs) of multiple objects at a time
You can use ossutil to change the ACLs of multiple objects at a time.
Change the ACLs of multiple objects at a time by including the -r(--recursive) option in the set-acl command of ossutil. For more information, see set-acl.
Change the ACLs of multiple objects at a time by modifying the metadata of the specified objects by including the -r(--recursive) option in the set-meta command of ossutil. For more information, see set-meta (manage object metadata).
Restore multiple objects at a time
You can use the following methods to restore multiple Archive and Cold Archive objects at a time:
ossutil
Restore multiple objects from the frozen state to the restored state at a time by including the -r(--recursive) option in the restore command of ossutil. For more information, see restore.
ossbrowser
Use ossbrowser to select objects that you want to restore and restore them at a time.
Modify the metadata of multiple objects at a time
You can use the following methods to modify the metadata of multiple objects at a time:
ossutil
Modify the metadata of the specified objects at a time by including the -r(--recursive) option in the set-meta command of ossutil. For more information, see set-meta (manage object metadata).
You can use this command to change the storage classes and ACLs of multiple objects at a time.
OSS console
Change the metadata of multiple objects at a time by modifying the HTTP headers of the objects in the OSS console. For more information, see Manage object metadata.