Undeleting an Object
Scenarios
If versioning is not enabled for a bucket, deleted objects cannot be recovered.
After a bucket has versioning enabled, deleting a file from the Objects list does not permanently delete it. Instead, OBS inserts a delete marker and retains the deleted file in the Deleted Objects list. You can recover the deleted object by using the Undelete operation.
Important Notes
- Files can be undeleted, but folders cannot.
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 deletion, it will be recovered to its original path after you undelete it.
- Deleted files in the Deleted Objects still keep multiple versions. When deleting these versions, keep the following points in mind:
- Deleting a version with the delete marker actually recovers the file instead of permanently deleting it. For details, see Related Operations.
- Deleting a version without the delete marker permanently deletes this version. This version will not be recovered, even if the file is recovered later.
Prerequisites
- Versioning has been enabled for the bucket. For details, see Versioning.
- The file to be recovered is in the Deleted Objects list and has at least one version without the delete marker.
Ways to Undelete Objects
You can use OBS Console to undelete objects.
- In the navigation pane of OBS Console, choose Object Storage.
- In the bucket list, click the bucket you want to operate. The Objects page is displayed.
- Click Deleted Objects.
- In the row of the deleted file you want to recover, click Undelete on the right.
You can select multiple files and click Undelete above the object list to batch recover them.
Figure 1 Undeleting a file
Related Operations
Recover a file by deleting its version with the delete marker:
- In the navigation pane of OBS Console, choose Object Storage.
- In the bucket list, click the bucket you want to operate. The Objects page is displayed.
- Enable Historical Versions.
- Locate the file to be retrieved with all its historical versions.
- If you delete a version with the Delete Marker, the file will be recovered and retained in the Objects list.
- If you delete a version without the Delete Marker, that version will be permanently deleted.
Figure 2 Versions of files in the Deleted Objects list
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot