Objects in the Object Storage Service (OSS) Archive, Cold Archive, or Deep Cold Archive storage classes are stored in a frozen state. This state saves costs but prevents the objects from being read directly. You must restore these objects to a readable state before you can download, process, or analyze them.
How it works
Restoration creates a temporary, readable replica of an object in a frozen state. This operation does not change the storage class of the original object. The object transitions through the following states:
Frozen: The initial, unreadable state of an object. Only non-read operations such as querying metadata and deleting the object are supported.
Restoring: An object enters this state after a
RestoreObject
request is submitted. The request is processed asynchronously.For the initial request, the API returns
202 Accepted
.If you submit another restore request with the same priority while the object is in this state, the API returns a
409 Conflict
error, which indicates that the operation is already in progress. However, you can submit a new request with a higher priority to expedite the process.
Restored: The temporary replica is created, and the object enters this state. You can now read the object content. If you submit another restore request in this state, the API returns
200 OK
and extends the validity period of the temporary replica.Replica expired: When the validity period of the replica ends, the temporary replica is deleted. To read the object again, you must submit another restore request.
Select a restoration priority
The time required to complete a restoration varies based on the storage class and the selected priority. The actual restoration time may vary.
Storage class of the object | Restoration priority | Description |
Archive | / | Restoration completes within 1 minute. |
Cold Archive | Expedited | Restoration completes within 1 hour. |
Standard | Restoration completes within 2 to 5 hours. | |
Bulk | Restoration completes within 5 to 12 hours. | |
Deep Cold Archive | Expedited | Restoration completes within 12 hours. |
Standard | Restoration completes within 48 hours. |
Select a validity period for the replica
The validity period of the replica is the number of days that the object remains readable after it is restored. During this period, you can access the object at any time without incurring additional data retrieval fees. Plan a reasonable duration based on your business needs. To read the object only once, set the duration to 1 day. To access the object frequently over a period of time, set a longer duration to avoid repeated data retrieval fees.
Storage class of the object | Description |
Archive | A positive integer from 1 to 7. Unit: days. |
Cold Archive | A positive integer from 1 to 365. Unit: days. |
Deep Cold Archive | A positive integer from 1 to 365. Unit: days. |
Perform restoration
You can start the restoration after you determine the restoration priority and the validity period for the replica.
Console
The console does not support batch restoration of objects within the same folder. To perform batch restoration, use ossutil, an SDK, or the API.
Log on to the OSS console.
Click Buckets, then click the name of the target bucket.
In the navigation pane on the left, choose Files > Objects.
In the Actions column of the target object, choose In the dialog box that appears, configure Restore Priority and Replica Validity Period. .
SDK
Restoring objects programmatically with an SDK allows for more flexible automation and error handling.
import com.aliyun.oss.*; import com.aliyun.oss.common.auth.*; import com.aliyun.oss.common.comm.SignVersion; import com.aliyun.oss.model.*; public class Demo { public static void main(String[] args) throws Exception { // In this example, the endpoint of the China (Hangzhou) region is used. Specify your actual endpoint. String endpoint = "https://oss-cn-hangzhou.aliyuncs.com"; // Obtain access credentials from environment variables. Before you run the sample code, make sure that the OSS_ACCESS_KEY_ID and OSS_ACCESS_KEY_SECRET environment variables are configured. EnvironmentVariableCredentialsProvider credentialsProvider = CredentialsProviderFactory.newEnvironmentVariableCredentialsProvider(); // Specify the name of the bucket. Example: examplebucket. String bucketName = "examplebucket"; // Specify the full path of the Archive object. Do not include the bucket name in the full path. String objectName = "exampledir/object"; // Specify the region in which the bucket is located. For example, if the bucket is located in the China (Hangzhou) region, set the region to cn-hangzhou. String region = "cn-hangzhou"; // Create an OSSClient instance. // Call the shutdown method to release resources when the OSSClient is no longer in use. ClientBuilderConfiguration clientBuilderConfiguration = new ClientBuilderConfiguration(); clientBuilderConfiguration.setSignatureVersion(SignVersion.V4); OSS ossClient = OSSClientBuilder.create() .endpoint(endpoint) .credentialsProvider(credentialsProvider) .clientConfiguration(clientBuilderConfiguration) .region(region) .build(); try { ObjectMetadata objectMetadata = ossClient.getObjectMetadata(bucketName, objectName); // Check whether the object is an Archive object. StorageClass storageClass = objectMetadata.getObjectStorageClass(); if (storageClass == StorageClass.Archive) { // Restore the object. ossClient.restoreObject(bucketName, objectName); // Specify the time to wait for the object to be restored. do { Thread.sleep(1000); objectMetadata = ossClient.getObjectMetadata(bucketName, objectName); } while (!objectMetadata.isRestoreCompleted()); } // Query the restored object. OSSObject ossObject = ossClient.getObject(bucketName, objectName); ossObject.getObjectContent().close(); } catch (OSSException oe) { System.out.println("Caught an OSSException, which means your request made it to OSS, " + "but was rejected with an error response for some reason."); System.out.println("Error Message:" + oe.getErrorMessage()); System.out.println("Error Code:" + oe.getErrorCode()); System.out.println("Request ID:" + oe.getRequestId()); System.out.println("Host ID:" + oe.getHostId()); } catch (ClientException ce) { System.out.println("Caught an ClientException, which means the client encountered " + "a serious internal problem while trying to communicate with OSS, " + "such as not being able to access the network."); System.out.println("Error Message:" + ce.getMessage()); } finally { if (ossClient != null) { ossClient.shutdown(); } } } }
import time import argparse import alibabacloud_oss_v2 as oss # Create a command-line argument parser. parser = argparse.ArgumentParser(description="restore object sample") # Add the required command-line arguments. parser.add_argument('--region', help='The region in which the bucket is located.', required=True) parser.add_argument('--bucket', help='The name of the bucket.', required=True) parser.add_argument('--endpoint', help='The domain names that other services can use to access OSS') parser.add_argument('--key', help='The name of the object.', required=True) def main(): # Parse the incoming command-line arguments. args = parser.parse_args() # Load authentication information from environment variables. credentials_provider = oss.credentials.EnvironmentVariableCredentialsProvider() # Use the default SDK configurations. cfg = oss.config.load_default() # Set the credential provider to environment variable authentication. cfg.credentials_provider = credentials_provider # Set the region. cfg.region = args.region # If an endpoint is provided, set it as a configuration item. if args.endpoint is not None: cfg.endpoint = args.endpoint # Create an OSS client. client = oss.Client(cfg) # Execute the request to restore the object. result = client.restore_object(oss.RestoreObjectRequest( bucket=args.bucket, key=args.key, restore_request=oss.RestoreRequest( days=1, # Optional: Set the restoration priority for Cold Archive or Deep Cold Archive objects. Valid values: Expedited, Standard, and Bulk. Default value: Standard. # tier="Bulk", ) )) # Print the result of the restoration request. print(f'status code: {result.status_code},' f' request id: {result.request_id},' f' version id: {result.version_id},' f' restore priority: {result.restore_priority},' ) # Loop to check whether the object restoration is complete. while True: # Get the object header. result = client.head_object(oss.HeadObjectRequest( bucket=args.bucket, key=args.key, )) # Check the restoration status. if result.restore and result.restore != 'ongoing-request="true"': print('restore is success') break # Check again after 5 seconds. time.sleep(5) print(result.restore) # Program entry point. if __name__ == "__main__": main()
const OSS = require('ali-oss') const client = new OSS({ // Specify the region in which the bucket is located. For example, if the bucket is located in the China (Hangzhou) region, set the region to oss-cn-hangzhou. region: 'yourRegion', // Obtain access credentials from environment variables. Before you run the sample code, make sure that the OSS_ACCESS_KEY_ID and OSS_ACCESS_KEY_SECRET environment variables are configured. accessKeyId: process.env.OSS_ACCESS_KEY_ID, accessKeySecret: process.env.OSS_ACCESS_KEY_SECRET, authorizationV4: true, // Specify the name of the bucket. Example: examplebucket. bucket: 'examplebucket', }); // Specify the name of the Archive object that you want to restore. Example: exampleobject.txt. client.restore('exampleobject.txt').then((res) => { console.log(res); }).catch(err => { console.log(err); })
using Aliyun.OSS; using Aliyun.OSS.Model; using Aliyun.OSS.Model; using System.Net; using System.Text; using Aliyun.OSS.Common; // Specify the endpoint of the region in which the bucket is located. For example, if the bucket is located in the China (Hangzhou) region, set the endpoint to https://oss-cn-hangzhou.aliyuncs.com. var endpoint = "yourEndpoint"; // Obtain access credentials from environment variables. Before you run the sample code, make sure that the OSS_ACCESS_KEY_ID and OSS_ACCESS_KEY_SECRET environment variables are configured. var accessKeyId = Environment.GetEnvironmentVariable("OSS_ACCESS_KEY_ID"); var accessKeySecret = Environment.GetEnvironmentVariable("OSS_ACCESS_KEY_SECRET"); // Specify the name of the bucket. var bucketName = "examplebucket"; // Specify the full path of the object. The path cannot contain the bucket name. var objectName = "yourObjectName"; // Specify the content of the object. var objectContent = "More than just cloud."; int maxWaitTimeInSeconds = 600; // Specify the region in which the bucket is located. For example, if the bucket is located in the China (Hangzhou) region, set the region to cn-hangzhou. const string region = "cn-hangzhou"; // Create a ClientConfiguration instance and modify the default parameters based on your requirements. var conf = new ClientConfiguration(); // Use the signature algorithm V4. conf.SignatureVersion = SignatureVersion.V4; // Create an OSSClient instance. var client = new OssClient(endpoint, accessKeyId, accessKeySecret, conf); client.SetRegion(region); try { // Create an Archive bucket. var bucket = client.CreateBucket(bucketName, StorageClass.Archive); Console.WriteLine("Create Archive bucket succeeded, {0} ", bucket.Name); } catch (Exception ex) { Console.WriteLine("Create Archive bucket failed, {0}", ex.Message); } // Upload the object to the bucket and set the storage class of the object to Archive. try { byte[] binaryData = Encoding.ASCII.GetBytes(objectContent); MemoryStream requestContent = new MemoryStream(binaryData); client.PutObject(bucketName, objectName, requestContent); Console.WriteLine("Put object succeeded, {0}", objectName); } catch (Exception ex) { Console.WriteLine("Put object failed, {0}", ex.Message); } var metadata = client.GetObjectMetadata(bucketName, objectName); string storageClass = metadata.HttpMetadata["x-oss-storage-class"] as string; if (storageClass != "Archive") { Console.WriteLine("StorageClass is {0}", storageClass); return; } // Restore the Archive object. RestoreObjectResult result = client.RestoreObject(bucketName, objectName); Console.WriteLine("RestoreObject result HttpStatusCode : {0}", result.HttpStatusCode); if (result.HttpStatusCode != HttpStatusCode.Accepted) { throw new OssException(result.RequestId + ", " + result.HttpStatusCode + " ,"); } while (maxWaitTimeInSeconds > 0) { var meta = client.GetObjectMetadata(bucketName, objectName); string restoreStatus = meta.HttpMetadata["x-oss-restore"] as string; if (restoreStatus != null && restoreStatus.StartsWith("ongoing-request=\"false\"", StringComparison.InvariantCultureIgnoreCase)) { break; } Thread.Sleep(1000); // The maximum wait time decreases by 1 second. maxWaitTimeInSeconds--; } if (maxWaitTimeInSeconds == 0) { Console.WriteLine("RestoreObject is timeout. "); throw new TimeoutException(); } else { Console.WriteLine("RestoreObject is successful. "); }
// Restore the object. RestoreObjectRequest restore = new RestoreObjectRequest(); // Specify the name of the bucket. Example: examplebucket. restore.setBucketName("examplebucket"); // Specify the full path of the object. Do not include the bucket name in the full path. Example: exampleobject.txt. restore.setObjectKey("exampleobject.txt"); OSSAsyncTask task = oss.asyncRestoreObject(restore, new OSSCompletedCallback<RestoreObjectRequest, RestoreObjectResult>() { @Override public void onSuccess(RestoreObjectRequest request, RestoreObjectResult result) { Log.i("info", "code::"+result.getStatusCode()); } @Override public void onFailure(RestoreObjectRequest request, ClientException clientException, ServiceException serviceException) { Log.e("errorMessage", "error: "+serviceException.getRawMessage()); } }); task.waitUntilFinished();
OSSRestoreObjectRequest *request = [OSSRestoreObjectRequest new]; // Specify the name of the bucket. Example: examplebucket. request.bucketName = @"examplebucket"; // Specify the full path of the object. Do not include the bucket name in the full path. Example: exampleobject.txt. request.objectKey = @"exampleobject.txt"; OSSTask *restoreObjectTask = [client restoreObject:request]; [restoreObjectTask continueWithBlock:^id _Nullable(OSSTask * _Nonnull task) { if (!task.error) { NSLog(@"restore object success"); } else { NSLog(@"restore object failed, error: %@", task.error); } return nil; }]; // Implement synchronous blocking to wait for the task to complete. // [restoreObjectTask waitUntilFinished];
#include <alibabacloud/oss/OssClient.h> #include <thread> #include <chrono> #include <algorithm> using namespace AlibabaCloud::OSS; int main(void) { /* Initialize information about the account that is used to access OSS. */ /* Specify the endpoint of the region in which the bucket is located. For example, if the bucket is located in the China (Hangzhou) region, set the endpoint to https://oss-cn-hangzhou.aliyuncs.com. */ std::string Endpoint = "yourEndpoint"; /* Specify the region in which the bucket is located. For example, if the bucket is located in the China (Hangzhou) region, set the region to cn-hangzhou. */ std::string Region = "yourRegion"; /* Specify the name of the bucket. Example: examplebucket. */ std::string BucketName = "examplebucket"; /* Specify the full path of the Archive object. Do not include the bucket name in the full path. */ std::string ObjectName = "yourObjectName"; /* Initialize resources such as network resources. */ InitializeSdk(); ClientConfiguration conf; conf.signatureVersion = SignatureVersionType::V4; /* Obtain access credentials from environment variables. Before you run the sample code, make sure that the OSS_ACCESS_KEY_ID and OSS_ACCESS_KEY_SECRET environment variables are configured. */ auto credentialsProvider = std::make_shared<EnvironmentVariableCredentialsProvider>(); OssClient client(Endpoint, credentialsProvider, conf); client.SetRegion(Region); /* Restore the Archive object. */ auto outcome = client.RestoreObject(BucketName, ObjectName); /* You cannot restore objects of the non-Archive storage class. */ if (!outcome.isSuccess()) { /* Handle exceptions. */ std::cout << "RestoreObject fail, code:" << outcome.error().Code() << ", message:" << outcome.error().Message() << ", requestId:" << outcome.error().RequestId() << std::endl; return -1; } std::string onGoingRestore("ongoing-request=\"false\""); int maxWaitTimeInSeconds = 600; while (maxWaitTimeInSeconds > 0) { auto meta = client.HeadObject(BucketName, ObjectName); std::string restoreStatus = meta.result().HttpMetaData()["x-oss-restore"]; std::transform(restoreStatus.begin(), restoreStatus.end(), restoreStatus.begin(), ::tolower); if (!restoreStatus.empty() && restoreStatus.compare(0, onGoingRestore.size(), onGoingRestore)==0) { std::cout << " success, restore status:" << restoreStatus << std::endl; /* The Archive object is restored. */ break; } std::cout << " info, WaitTime:" << maxWaitTimeInSeconds << "; restore status:" << restoreStatus << std::endl; std::this_thread::sleep_for(std::chrono::seconds(10)); maxWaitTimeInSeconds--; } if (maxWaitTimeInSeconds == 0) { std::cout << "RestoreObject fail, TimeoutException" << std::endl; } /* Release resources such as network resources. */ ShutdownSdk(); return 0; }
#include "oss_api.h" #include "aos_http_io.h" /* Specify the endpoint of the region in which the bucket is located. For example, if the bucket is located in the China (Hangzhou) region, set the endpoint to https://oss-cn-hangzhou.aliyuncs.com. */ const char *endpoint = "yourEndpoint"; /* Specify the name of the bucket. Example: examplebucket. */ const char *bucket_name = "examplebucket"; /* Specify the full path of the object. Do not include the bucket name in the full path. Example: exampledir/exampleobject.txt. */ const char *object_name = "exampledir/exampleobject.txt"; /* Specify the region in which the bucket is located. For example, if the bucket is located in the China (Hangzhou) region, set the region to cn-hangzhou. */ const char *region = "yourRegion"; void init_options(oss_request_options_t *options) { options->config = oss_config_create(options->pool); /* Use a char* string to initialize data of the aos_string_t type. */ aos_str_set(&options->config->endpoint, endpoint); /* Obtain access credentials from environment variables. Before you run the sample code, make sure that the OSS_ACCESS_KEY_ID and OSS_ACCESS_KEY_SECRET environment variables are configured. */ aos_str_set(&options->config->access_key_id, getenv("OSS_ACCESS_KEY_ID")); aos_str_set(&options->config->access_key_secret, getenv("OSS_ACCESS_KEY_SECRET")); // Specify two additional parameters. aos_str_set(&options->config->region, region); options->config->signature_version = 4; /* Specify whether to use CNAME. The value 0 indicates that CNAME is not used. */ options->config->is_cname = 0; /* Specify network parameters, such as the timeout period. */ options->ctl = aos_http_controller_create(options->pool, 0); } int main(int argc, char *argv[]) { /* Call the aos_http_io_initialize method in main() to initialize global resources, such as network resources and memory resources. */ if (aos_http_io_initialize(NULL, 0) != AOSE_OK) { exit(1); } /* Create a memory pool to manage memory. aos_pool_t is equivalent to apr_pool_t. The code used to create a memory pool is included in the APR library. */ aos_pool_t *pool; /* Create a memory pool. The value of the second parameter is NULL. This value indicates that the pool does not inherit other memory pools. */ aos_pool_create(&pool, NULL); /* Create and initialize options. This parameter includes global configuration information, such as endpoint, access_key_id, access_key_secret, is_cname, and curl. */ oss_request_options_t *oss_client_options; /* Allocate the memory resources in the memory pool to the options. */ oss_client_options = oss_request_options_create(pool); /* Initialize oss_client_options. */ init_options(oss_client_options); /* Initialize the parameters. */ aos_string_t bucket; aos_string_t object; aos_table_t *headers = NULL; aos_table_t *resp_headers = NULL; aos_status_t *resp_status = NULL; aos_str_set(&bucket, bucket_name); aos_str_set(&object, object_name); headers = aos_table_make(pool, 0); /* Restore the object. */ do { headers = aos_table_make(pool, 0); resp_status = oss_restore_object(oss_client_options, &bucket, &object, headers, &resp_headers); printf("restore object resp_status->code: %d \n", resp_status->code); if (resp_status->code != 409) { break; } else { printf("restore object is already in progress, resp_status->code: %d \n", resp_status->code); apr_sleep(5000); } } while (1); /* Release the memory pool. This operation releases the memory resources allocated for the request. */ aos_pool_destroy(pool); /* Release the allocated global resources. */ aos_http_io_deinitialize(); return 0; }
package main import ( "context" "flag" "log" "github.com/aliyun/alibabacloud-oss-go-sdk-v2/oss" "github.com/aliyun/alibabacloud-oss-go-sdk-v2/oss/credentials" ) // Specify the global variables. var ( region string // The region in which the bucket is located. bucketName string // The name of the bucket. objectName string // The name of the object. ) // Specify the init function used to initialize command line parameters. func init() { flag.StringVar(®ion, "region", "", "The region in which the bucket is located.") flag.StringVar(&bucketName, "bucket", "", "The name of the bucket.") flag.StringVar(&objectName, "object", "", "The name of the object.") } func main() { // Parse command line parameters. flag.Parse() // Check whether the bucket name is empty. if len(bucketName) == 0 { flag.PrintDefaults() log.Fatalf("invalid parameters, bucket name required") } // Check whether the region is empty. if len(region) == 0 { flag.PrintDefaults() log.Fatalf("invalid parameters, region required") } // Check whether the object name is empty. if len(objectName) == 0 { flag.PrintDefaults() log.Fatalf("invalid parameters, object name required") } // Load the default configurations and specify the credential provider and region. cfg := oss.LoadDefaultConfig(). WithCredentialsProvider(credentials.NewEnvironmentVariableCredentialsProvider()). WithRegion(region) // Create an OSSClient instance. client := oss.NewClient(cfg) // Create a request to restore an object. request := &oss.RestoreObjectRequest{ Bucket: oss.Ptr(bucketName), // The name of the bucket. Key: oss.Ptr(objectName), // The name of the object. RestoreRequest: &oss.RestoreRequest{ Days: 3, // Set the number of days for which the object can remain in the restored state to 3. }, } // Execute the request to restore the object. result, err := client.RestoreObject(context.TODO(), request) if err != nil { log.Fatalf("failed to restore object %v", err) } // Display the result of the object restoration operation. log.Printf("restore object result:%#v\n", result) }
<?php // Include the autoload file to load dependencies. require_once __DIR__ . '/../vendor/autoload.php'; use AlibabaCloud\Oss\V2 as Oss; // Define and describe command-line parameters. $optsdesc = [ "region" => ['help' => 'The region in which the bucket is located.', 'required' => True], // (Required) Specify the region in which the bucket is located. "endpoint" => ['help' => 'The domain names that other services can use to access OSS.', 'required' => False], // (Optional) Specify the endpoint for accessing OSS. "bucket" => ['help' => 'The name of the bucket', 'required' => True], // (Required) Specify the name of the bucket. "key" => ['help' => 'The name of the object', 'required' => True], // (Required) Specify the name of the object. ]; // Convert the descriptions to a list of long options required by getopt. // Add a colon (:) to the end of each parameter to indicate that a value is required. $longopts = \array_map(function ($key) { return "$key:"; }, array_keys($optsdesc)); // Parse the command-line parameters. $options = getopt("", $longopts); // Check whether the required parameters are configured. foreach ($optsdesc as $key => $value) { if ($value['required'] === True && empty($options[$key])) { $help = $value['help']; // Obtain help information for the parameters. echo "Error: the following arguments are required: --$key, $help" . PHP_EOL; exit(1); // Exit the program if a required parameter is missing. } } // Assign the values parsed from the command-line parameters to the corresponding variables. $region = $options["region"]; // The region in which the bucket is located. $bucket = $options["bucket"]; // The name of the bucket. $key = $options["key"]; // The name of the object. // Load access credentials from environment variables. // Use EnvironmentVariableCredentialsProvider to retrieve the AccessKey ID and AccessKey secret from environment variables. $credentialsProvider = new Oss\Credentials\EnvironmentVariableCredentialsProvider(); // Use the default configuration of the SDK. $cfg = Oss\Config::loadDefault(); $cfg->setCredentialsProvider($credentialsProvider); // Specify the credential provider. $cfg->setRegion($region); // Specify the region in which the bucket is located. if (isset($options["endpoint"])) { $cfg->setEndpoint($options["endpoint"]); // Specify the endpoint if one is provided. } // Create an OSSClient instance. $client = new Oss\Client($cfg); // Create a RestoreObjectRequest object to restore the Archive object. $request = new Oss\Models\RestoreObjectRequest(bucket: $bucket, key: $key); // Restore the object. $result = $client->restoreObject($request); // Display the result. printf( 'status code:' . $result->statusCode . PHP_EOL . // The HTTP status code. For example, HTTP status code 200 indicates that the request succeeded. 'request id:' . $result->requestId . PHP_EOL // The request ID, which can be used to debug or trace the request. );
ossutil
ossutil is a command-line interface (CLI) tool for managing OSS. It is suitable for scripted and automated batch restoration tasks.
Restore Archive objects
The following command restores the Archive object exampleobject.txt in the bucket named examplebucket.
ossutil restore oss://examplebucket/exampleobject.txt
The following command restores the Archive object exampleobject.txt in the bucket named examplebucket and sets the duration of the restored state to 3 days.
ossutil restore oss://examplebucket/exampleobject.txt --days 3
The following command restores objects from a list.
NoteEach line in the list file represents an object in the OSS path format: oss://{bucket}/{key}. The following code provides an example of the list.txt file:
oss://examplebucket/key1 oss://examplebucket/key2
ossutil restore list://list.txt
The following command directly restores objects from a list without checking the object status.
ossutil restore list://list.txt --no-check-status
The following command restores objects from a manifest file.
NoteAfter you run an inventory task, a csv.gz file and a manifest.json file are generated in the inventory results. These two files are required to restore objects from the manifest file.
ossutil restore list://ca8007fc-4123-493e-9a01-dd1511fbac54.csv.gz --list-format inventory --list-manifest-from manifest.json
The following command directly restores objects from a manifest file without checking the object status.
ossutil restore list://ca8007fc-4123-493e-9a01-dd1511fbac54.csv.gz --list-format inventory --list-manifest-from manifest.json --no-check-status
Restore Cold Archive objects
The following command restores the Cold Archive object exampleobject.txt in the bucket named examplebucket and sets the duration of the restored state to 5 days.
ossutil restore oss://examplebucket/exampleobject.txt --tier Bulk --days 5
Restore Deep Cold Archive objects
The following command restores the Deep Cold Archive object exampleobject.txt in the bucket named examplebucket and sets the duration of the restored state to 10 days.
ossutil restore oss://examplebucket/exampleobject.txt --tier Standard --days 10
For more information about the command, see restore (Restore objects).
ossbrowser
ossbrowser supports bucket-level operations that are similar to those in the console. You can follow the instructions in the ossbrowser UI to restore objects. For more information about how to use ossbrowser, see Common Operations.
API
If your application has high customization requirements, you can call RESTful APIs directly. When you call an API directly, you must include the signature calculation in your code. For more information, see RestoreObject.
Billing
Billable item | Description | Applicable storage classes |
A one-time fee, calculated based on the amount of data restored (in GB), is the primary cost of restoration. | Archive, Cold Archive, Deep Cold Archive | |
A fee is charged for each | Archive (billed as PUT requests), Cold Archive, and Deep Cold Archive (billed as retrieval requests) | |
Storage fees for the object's original storage class continue to apply during and after restoration. | Archive, Cold Archive, Deep Cold Archive | |
The temporary replica consumes storage space and incurs daily fees for its validity period. | Cold Archive, Deep Cold Archive |
Quotas and limitations
For a single Alibaba Cloud account in one region, the restoration quota for Cold Archive objects is approximately 500 objects per second on average. The total restoration quota across the three restoration priorities is 100 TB to 120 TB per day. To apply for a higher quota, contact Technical Support.
For a single Alibaba Cloud account in one region, the restoration quota for Deep Cold Archive objects is approximately 100 objects per second on average. The total restoration quota across the two restoration priorities is 10 TB to 15 TB per day. To apply for a higher quota, contact Technical Support.
You can still submit restoration requests after the quotas for Cold Archive and Deep Cold Archive objects are exceeded. These requests are queued, and the restoration time may be longer than the time specified for the selected priority.