tencent cloud


Restoring Archived Objects - restore

Last updated: 2022-05-03 11:19:36

    The restore command is used to restore archived objects.

    Command Syntax

    ./coscli restore cos://<bucketAlias>[/prefix/] [flag]

    The restore command contains the following optional flags:

    Flag Abbreviation Flag Full Name Description
    None --include Includes specific objects
    None --exclude Excludes specific objects
    -d --days Specifies the expiration time of temporary objects, which is 3 days by default
    -m --mode Specifies the restoration mode, which is Standard by default
    -r --recursive Traverses the folder recursively

    • --include and --exclude support standard regular expression syntax, so you can use them to filter out objects that meet specific criteria.
    • When using zsh, you may need to add double quotes at both ends of the pattern string.
    ./coscli restore cos://bucket1/example/ -r --include ".*.mp4"


    Restoring archived objects in bucket1 bucket in Standard mode

    ./coscli restore cos://bucket1/picture.jpg

    Restoring all archived objects in picture folder in bucket1 bucket in Expedited mode

    ./coscli restore cos://bucket1/picture/ -r --mode Expedited

    Before running this command, you need to make sure that all objects in the folder are of the same storage class (such as ARCHIVE). If there are objects in different classes, use --include or --exclude to filter out objects in the same class.

    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support