apache / apache/opendal

feature requests: Add `undelete` support

Open
#4,321 6 comments 4 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
5.4k
Forks
825
Avg merge
1d 14m
Merged PRs (30d)
127

Description

Part of https://github.com/apache/opendal/issues/2611

After we have object versioning, it's possible for us add API like `undelete` which can restore a file from `deleted` states.

There are several possibilities:

- Add API like `undelete` / `restore` which focus on `restore` deleted files from existing versions.
- Add API like `promote` which focus on `promote` existing version as current version (this covers `restore`, but harder for users to understand what it does)
- Extend `copy` instead of adding new API.
- *Welcome new designs*

## References

### How to restore deleted files in cloud storage?

- [S3](https://docs.aws.amazon.com/AmazonS3/latest/userguide/DeleteMarker.html): delete `delete_marker` for an object, `delete_marker` should be fetched via `list_objects_version`
- [Gcs](https://cloud.google.com/storage/docs/using-versioned-objects#restore): *In Cloud Storage, restoring a noncurrent object version means making a copy of it*
- [Azblob](https://learn.microsoft.com/en-us/azure/storage/blobs/versioning-overview#restoring-a-soft-deleted-version): *To restore the current version, first restore all soft-deleted versions, and then use the [Copy Blob](https://learn.microsoft.com/en-us/rest/api/storageservices/copy-blob) operation to copy a previous version to a new current version.*

Contributor guide

Open the contributing guide

Research direction

Start with the parent issue #2611 and the object-versioning design context. Compare the S3, GCS, and Azure restoration references, then evaluate undelete/restore, promote, and extending copy; done requires a decided API design and a clear restoration behavior across supported storage services.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.