Updated on 2023-07-17 GMT+08:00

Undeleting an Object

Scenarios

If versioning is not enabled for a bucket, deleted objects cannot be recovered. If versioning is enabled, you can recover deleted objects through the Undelete operation. For details about versioning, see Versioning.

Object Recovery Mechanism When Versioning Is Enabled

When a bucket has the versioning function enabled, deleting a file from the Objects list does not permanently delete it. The deleted file will be retained with the Delete Marker in the Deleted Objects list. You can recover a deleted object by the Undelete operation.

When performing the Undelete operation, note the following points:

  1. You can only undelete deleted files but not folders.

    After you undelete a deleted file, the file is recovered and will appear in the Objects list. Then you can perform basic operations on the file as you normally do on other objects. If the file was stored in a folder before the deletion, it will be recovered to its original path after you undelete it.

  2. Deleted files in the Deleted Objects also have multiple versions. When deleting different versions of files, note the following points:
    • If you delete a version with the Delete Marker, it actually recovers that specific version instead of permanently deleting it.
    • If you delete a version without the Delete Marker, that specific version is deleted permanently. Even if the object is recovered later, this version will not be recovered.
  3. At least one version without the Delete Marker exists in the Deleted Objects list. Otherwise, the deletion cannot be canceled.

How to Use

You can use OBS Console to undelete objects.

Tool

Reference

OBS Console

Undeleting a File