What batch operations does OSS have?

important

This article contains important information that needs your attention. Ignoring this information may affect your business. Please read it carefully.

Object Storage OSS Provide a variety of ways to access and manage files (objects). To improve operation efficiency, you can refer to the methods shown in this article to manage files in batches, such as batch upload, download, copy, and delete files.

Batch upload

You can use the following methods to upload files in batches:

  • ossimport tool

    Support local and third-party cloud storage from servers (S3, Azure, Tencent COS Etc.) OSS Mass migration of data to OSS, It is especially suitable for the situation with a large amount of data. For details, see ossimport summary

  • ossutil tool

    use ossutil Instrumental cp Command -r(--recursive) Option, can upload files to OSS。 For details, see ossutil Batch upload

  • ossbrowser tool

    use ossbrowser Tools batch select files and upload them to OSS。 For details, see ossbrowser 2.0 Common Operations

  • OSS Console

    use OSS The console selects files in batches and uploads them to OSS。 For details, see Simple upload

  • ZIP Package decompression

    use ZIP The package decompression function, first configure the decompression rules, and then package multiple files into ZIP Package upload to OSS。 At this point, the trigger function calculation is decompressed and the decompressed file is returned OSS, Realize batch upload. For details, see ZIP Package decompression

Batch download

explain

If you want to download files in batches according to file information, such as the last update time. You can use the Storage space list Filter out the list of files that meet your expectations, and then use the following methods to download in batches.

You can use the following methods to download files in batches:

  • ossutil tool

    use ossutil Instrumental cp Command -r(--recursive) Option to batch download the files in the specified file directory to the local. For details, see ossutil Batch download

  • ossbrowser tool

    use ossbrowser The tool selects multiple files or file directories to download them locally in batches. For details, see ossbrowser 2.0 Common Operations

  • OSS Console

    use OSS The console selects multiple files and downloads them locally in batches. For details, see Simple download

  • Download files after packaging

    In combination with the function calculation service, you can package and download batch files locally. For details, see Using Function Calculation to Realize Package Download OSS file

Bulk Copy

You can use the following methods to batch copy files:

  • Cross region replication

    You can batch copy the specified prefix files through cross region copying. You can also choose whether to synchronize historical data and delete operations. For details, see Cross region replication of the same account

  • ossutil tool

    use ossutil Instrumental cp Command -r(--recursive) Option, as shown in the following figure, to batch copy files in the specified file directory to another file directory or another storage space under the same account. For details, see ossutil Bulk Copy

     image

  • ossbrowser tool

    use ossbrowser The tool selects multiple folders or files to copy one or more files to another file directory or another storage space under the same account. For details, see ossbrowser 2.0 Common Operations

Batch deletion

You can use the following methods to delete files in batches:

warning

The file cannot be recovered after deletion. Please be careful.

  • OSS SDK

    use SDK Delete files in batches.

    More Linguistic SDK For examples, see SDK Reference

  • OSS API

    adopt OSS Of DeleteMultipleObjects The interface can delete files in batches. For details, see DeleteMultipleObjects

  • ossutil tool

    use ossutil Of rm Command -r(--recursive) Option to batch delete files with the specified prefix. For details, see ossutil Batch deletion

     image

  • ossbrowser tool

    use ossbrowser The tool selects multiple files or file directories and deletes them in batches. For details, see ossbrowser 2.0 Common Operations

  • OSS Console

    • use OSS Check multiple files on the console and delete them in batches. For details, see Delete File

      You can also delete a file directory directly, and the files in the file directory will be deleted at the same time.

    • use OSS The fragment management function of the console can delete fragments in batches. For details, see Delete Fragments

  • Life cycle rules

    Automatically delete your files in batches through lifecycle rules. For details, see Life cycle rules based on the last modification time

Batch Modify File Storage Type

You can use the following methods to batch modify the storage type of files:

Batch Modify File Access Permissions (ACLs)

You can use the ossutil Tools batch modify files ACL:

  • use ossutil Of set-props Command --acl and -r(--recursive) Option to batch modify the storage type of the specified file. For details, see Set props (set object properties)

Batch unfreeze files

You can use the following methods to batch restore files in the "frozen" state of archive storage to readable status:

  • ossutil tool

    use restore Command -r(--recursive) Option. Files in batch recovery frozen status are readable. For details, see ossutil Batch unfreezing

  • ossbrowser tool

    use ossbrowser The tool checks the files to be unfrozen and unfreezes them in batch.

Batch setup file Meta information

You can use the following methods to batch modify the Meta Information:

  • ossutil tool

    use ossutil Of set-props Command --metadata and -r(--recursive) Option to batch modify the storage type of the specified file. For details, see Set props (set object properties)

  • OSS Console

    Check to modify on the console Http head Information file, batch setting file Meta Information. For details, see Manage file metadata