You need to enable JavaScript to run this app.
Torch Object Storage

Torch Object Storage

Copy page
Download PDF
User guide
Recycle Bin
Copy page
Download PDF
Recycle Bin
The Recycle Bin feature enhances data security by enabling you to recover recently deleted data. When enabled, TOS relocates deleted objects and directories to the specified recycle bin directory. TOS then automatically deletes objects and directories in the Recycle Bin after the specified retention period has elapsed.​
Prerequisites​
You have created an HNS bucket. For instructions, see Creating a bucket with hierarchical namespace enabled.​
Notes​
​
Category​
​
Description​
Using Recycle Bin​
Applicability​
Recycle Bin is exclusively compatible with HNS buckets.​
​
Retention period​
You can specify how many days objects should be kept in the Recycle Bin. The minimum duration is one day.​
​
Recovering deleted data​
  • You can manually recover deleted data, for example, by using rename.​
  • You can recover deleted data using the restore option in the console.​
Managing paths​
Default path​
  • The default path in the console is the .Trash/ folder in the root directory of a bucket.​
  • Currently, you can only set a custom recycle bin path via the API. Console configuration is not supported.​
​
Path creation and risks​
Once Recycle Bin is enabled, the system immediately creates the recycle bin directory.​
warning​
Do not delete the recycle bin directory or its parent directory, and do not create an object with the same name.​
​
Operation risks​
The recycle bin directory functions like a regular directory. Although you can upload or delete content as usual, be aware that there are potential risks involved.​
  • Deleting objects or empty directories within the Recycle Bin permanently deletes the data.​
  • Non-empty directories can only be deleted automatically after the retention period ends. They cannot be permanently deleted manually.​
  • Objects uploaded to this directory may be automatically removed by Recycle Bin.​
Path naming rules​
Path length limit​
The combined length of the recycle bin path and the actual object/directory path must not exceed 1,024 characters. Otherwise, moving items to the Recycle Bin will fail.​
​
Path format​
Path format: Recycle bin directory/(yyyymmddHH0000 | yyyymmddHH3000)/actual object or directory path. Where:​
  • yyyymmddHH represents the year, month, day, and hour in UTC.​
  • 0000 represents the minute range from 0 to 30, and "3000" represents the minute range from 30 to 60.​
For example:​
  • An object or directory deleted during the period [12:00,12:30) on January 1, 2025 would go into the 20250101120000 directory.​
  • An object or directory deleted during the period [12:30, 13:00) on January 1, 2025 would go into the 20250101123000 directory.​
​
Handling name conflicts​
Appending a suffix helps avoid name conflicts. The format is yyyymmddHHMMSS.milseconds.sequence number.​
  • Where:​
  • yyyymmddHHMMSS is a timestamp accurate to the second in UTC.​
  • milseconds is the last three digits of the millisecond time in UTC.​
  • sequence number should only be added when a name conflict still exists after appending yyyymmddHHMMSS.milseconds.​
  • Example: 20250101122510.345.1​
Others​
Deleting items in the Recycle Bin​
Once Recycle Bin is enabled, any non-empty directory deleted will be immediately moved to the Recycle Bin, along with its contents. However, you will only see cost savings after clearing your Recycle Bin.​
​
Working with lifecycle rules​
  • Deletion behavior: When a lifecycle rule triggers the deletion of an object, the object is first moved to the Recycle Bin. The object is permanently deleted only after the Recycle Bin's retention period expires. In this scenario, the object is retained longer than expected.​
  • Overlap rules: When a lifecycle rule applies to the recycle bin directory, deletion is triggered when the rule is satisfied or the retention period expires.​
  • Transition impact: Lifecycle transition rules also apply to objects in the Recycle Bin.​
​
Steps​
Enabling Recycle Bin​
  1. Log in to the TOS console.​
  1. In the left navigation pane, click Buckets. In the Buckets list, click the bucket you want to manage.​
  1. In the left navigation pane, select Recycle Bin. On the Recycle Bin page, configure the following parameters.​
  • ​
    Section​
    Parameter​
    Description​
    Basic configurations​
    Withdrawn station status​
    Switch on the feature.​
    Withdrawn policy​
    Default policy​
    • Withdrawn path: The console sets the path to .Trash/ by default. Once Recycle Bin is enabled, deleted objects are moved to this folder.​
    • Currently, it is not possible to modify the withdrawn path through the console. If you need to customize the path, configure it using the API.​
    • Processing rule: Specify how many days objects should be kept in the Recycle Bin. The minimum duration is one day. Click Edit in the Actions column to modify Cleaning time (days).​
    • Any objects left in the Recycle Bin after the specified time period will be automatically deleted.​
    ​
    Advanced policy (optional)​
    1. Click Advanced policy.​
    1. On the Withdrawn station advanced policy page, click Create policy.​
    1. In the Create advanced policies dialog box, configure Recycling Bin Path, Cleaning time (days), and Matching path. Requirements for the recycle bin path and matching path:​
    • Paths can contain Chinese characters, letters, numbers, and common symbols.​
    • Paths cannot start with a forward slash (/) or backslash (\). Consecutive forward slashes (/) are not allowed.​
    • ".." cannot be used as a directory name.​
    • You can specify a prefix for the policy to take effect. If you leave this field blank, the policy will apply to all objects in the bucket by default.​
    1. Once you have finished configuring, click OK.​
    Withdrawn station list​
    -​
    Displays the default policy and newly created advanced policies.​
    ​
  1. Once you have finished configuring, click OK.​
tip​
You can also enable the Recycle Bin feature in the Advanced settings section when creating a bucket.​
Using Recycle Bin in the console​
After you enable Recycle Bin for your HNS bucket, a special icon will appear on the Objects page. Click this icon to access the recycle bin root path and objects.​
Recycle bin root path​
​​​
Recycle bin objects​
​​​
Related operations​
​
Operation​
Steps​
Result​
Delete​
On the Objects page, select an object and click Delete at the bottom. In the confirmation dialog box, type "Delete" and click Delete.​
The object will be moved to the Recycle Bin.​
Permanently Delete​
On the Objects page, select the object and click the drop-down arrow next to Delete at the bottom of the list. Then, select Permanently Delete. In the confirmation dialog box, type "Permanently Delete" and click Permanently Delete.​
Objects will be permanently deleted and will not be moved to the Recycle Bin.​
Restore​
From the Objects page, navigate to the Recycle Bin folder. Select the object and click Restore at the bottom of the list or in the Actions column. The following scenarios apply in the Restore file dialog box:​
  • If the original path does not contain an object with the same name, click Restore.​
  • If the original path contains an object with the same name, use the One-click rename option to modify Target path. Then, click Restore.​
  • If the original path does not contain an object with the same name, the object is restored to its original path before deletion.​
  • If the original path contains an object with the same name, the object is restored to the original path before deletion, but with a different file name (the one configured in the Target path through One-click rename).​
Clear the Recycle Bin​
On the Objects page, navigate to the recycle bin folder. Then, select an object or folder and click Permanently Delete.​
The object will be permanently deleted.​
​
​
Last updated: 2026.08.05 16:47:55