Updated on 2026-11-02 GMT+08:00

Restoring Deleted Objects

After versioning is enabled, you can recover data lost due to accidental operations or application failures using one of the following methods:

  • Permanently delete the delete marker to restore the most recent historical version as the current version.
  • Copy a specific historical version of the object to restore that version as the current version.

Prerequisites

  • Versioning is enabled for the bucket that stores the objects.
  • To restore a deleted object by permanently removing the delete marker, the object must have at least one previous version that is not a delete marker.

Restoring a Deleted Object by Permanently Removing the Delete Marker

Deleting an object from a versioning-enabled bucket does not remove the object itself. Instead, OBS inserts a delete marker to indicate that the latest version of the object is in the deleted state, while the previous current version becomes a historical version. You can restore a deleted object by permanently removing the delete marker.

You can remove a delete marker using OBS Console, obsutil, SDKs, or APIs, but not using OBS Browser+.

Restoring an Object by Copying a Specific Object Version

You can copy a specific object version by specifying its version ID when using APIs or SDKs, but not using OBS Console, OBS Browser+, or obsutil.

Before copying, obtain the required version ID by referring to Viewing Object Versions (When Versioning Is Enabled or Suspended).