Deleting objects with versioning enabled

Content Platform Tenant Management Help

Version
9.7.x
File Size
4269 KB
Audience
anonymous
Part Number
MK-95HCPH002-19

If you delete an object while versioning is enabled, HCP:

  • Retains a copy of the deleted object as an old version.
  • Creates a special version, called delete marker or delete record as the current version to indicate that the object has been deleted. This version has a version ID but does not include any object data or metadata.

After you delete an object, any attempt to retrieve the object without specifying the version ID of an old version results in an HTTP 404 (Not Found) error code.

HCP keeps all old versions of a deleted object until pruned or is purged. If shredding is enabled on a version, HCP shreds the version when it is pruned or purged.

Because HCP keeps deleted objects as old versions, you can retrieve an accidentally deleted object if HCP has not yet pruned it. To do so, request the object, specifying the version ID of the version you want. You can restore the deleted object by storing the retrieved version as a new version.

Note: When you restore a deleted object, the new version gets the default metadata values for the namespace (unless you explicitly override them). The new version does not inherit the system metadata, custom metadata, or ACL from the delete marker or any old version of the object.

When you list the versions of an object that has been deleted and restored, the returned XML for delete marker or delete record identifies the version state as deleted, contains the date and time the object was deleted, and contains the version ID for the delete marker or delete record. The remaining XML contains information about the object that was deleted.