tencent cloud

Cloud Object Storage

DocumentationCloud Object Storage

Recycle Bin Settings

Focus Mode
Font Size
Last updated: 2026-01-07 17:25:54

Introduction

You can enable the recycle bin feature for your bucket via the COS console. This feature provides temporary storage for objects in the bucket to retain accidentally deleted data. Once enabled, all deleted files are not permanently removed but stored in the recycle bin, allowing users to restore and manage them. This effectively reduces the risk of data loss and enhances data management efficiency.
Note:
The recycle bin list currently lists all historical versions and delete markers of files. You can perform operations as needed. For details about historical versions and delete markers, see Version Control Overview and Delete Marker.
Files in the recycle bin will still incur storage capacity fees, while delete markers will not be billed. For details, see Storage Capacity Fees. Deleting files in the recycle bin will incur request fees. For details, see Request Fees. Data in IA, ARCHIVE, and DEEP_ARCHIVE storage classes is subject to limitations on the minimum storage duration of 30 days, 90 days, and 180 days, respectively. If early deletion occurs, you will be charged for the minimum storage duration of the corresponding storage class. For details, see About Early Deletion.

Must-Knows

The recycle bin feature depends on version control. Enabling the recycle bin will also enable version control. For details about version control, see Version Control Overview and Setting Version Control.
For large-scale file operations, it is recommended that you set lifecycle to perform the operations.
Once data is permanently deleted, it becomes irrecoverable and inaccessible. Please proceed with caution.
When the latest version of an object is a delete marker, performing a delete operation will restore the object to its previous historical version. Please proceed with caution.

Operation Steps

Enable Recycle Bin

1. Log in to the COS Console.
2. In the left sidebar, click Bucket List to go to the bucket list page.
3. Click the bucket for which you want to enable the recycle bin to go to the bucket details page.
4. In the left sidebar, select Recycle Bin List, and click Enable Recycle Bin.
5. After confirming the information, click OK to enable the recycle bin feature for the bucket. The version control feature will also be enabled simultaneously.

Restore Historical Version

Restore a Single Historical Version

1. Locate the historical version of the file you need to restore in the recycle bin list.
2. In the Operations column, click Restore to go to the dialog for information confirmation.



3. Within this dialog box, you can choose as needed whether to delete the original historical version of the file after restoration.
4. After confirming that the information is correct, click OK, and the historical version will be restored and become the latest version.

Batch Restore Historical Versions

1. Select the historical version files that need to be batch-restored in the recycle bin list.
2. On the list page, click Batch Restore to go to the dialog for information confirmation.



3. After confirming that the information is correct, click OK to batch restore the historical versions.

Clear Historical Versions

1. Click Clear Historical Versions in the recycle bin list to go to the dialog for information confirmation.



2. After confirming that the information is correct, enter the bucket name as prompted, click Confirm Clear to clear all historical versions of folders and objects in the recycle bin.
Note:
After the history is cleared, historical versions will be permanently deleted and cannot be recovered or accessed. Please exercise caution.

Enable Historical Versions Regular Cleanup

COS supports periodically cleaning up historical versions and delete markers without historical versions in the recycle bin. You can enable the feature for periodic cleanup of historical versions in the recycle bin. Once enabled, a lifecycle rule for periodic cleanup will be automatically configured. For more custom rules, please go to Set Lifecycle. The steps to enable the rule for periodic cleanup of historical versions in the recycle bin are as follows:
1. In the recycle bin list, find the switch for periodic cleanup of historical versions on the right side.



2. Turn on the switch, and enter the configuration dialog. You can configure the number of days after which historical version files will be automatically deleted as needed. For more field descriptions, see Set Lifecycle.
Note:
If you have previously configured lifecycle rules for deleting historical versions, after the periodic cleanup of historical versions is enabled, the deletion will be performed based on the rule execution priority. Please configure as needed.



3. After confirming that the information is correct, click OK to enable periodic cleanup of historical versions. Historical versions will be automatically deleted after the configured number of days.
Note:
After deletion, the data cannot be recovered or accessed. Please proceed with caution.
4. After enabling, you can view the details of this rule. Hover over the "Periodic Cleanup of Historical Versions" text to view it.



5. If you need to modify the periodic cleanup rule for historical versions, hover over the "Periodic Cleanup of Historical Versions" text, click Edit, and configure as needed.

Disable Periodic Cleanup of Historical Versions

1. In the recycle bin list, find the switch for periodic cleanup of historical versions on the right side.
2. Disable the switch, enter the confirmation dialog. After confirming that everything is correct, click OK to disable the periodic cleanup of historical versions, and the corresponding lifecycle rule will be deleted simultaneously.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback