feature requests: Add `undelete` support
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/restorewhich focus onrestoredeleted files from existing versions. - Add API like
promotewhich focus onpromoteexisting version as current version (this coversrestore, but harder for users to understand what it does) - Extend
copyinstead of adding new API. - Welcome new designs
References
How to restore deleted files in cloud storage?
- S3: delete
delete_markerfor an object,delete_markershould be fetched vialist_objects_version - Gcs: In Cloud Storage, restoring a noncurrent object version means making a copy of it
- Azblob: To restore the current version, first restore all soft-deleted versions, and then use the Copy Blob operation to copy a previous version to a new current version.
Maybe also related to https://github.com/apache/opendal/issues/4032
@Xuanwo I'm interest in this, how we should start?
@Xuanwo I'm interest in this, how we should start?
We don't yet have a clear implementation strategy. Please conduct some research and initially propose your design. Then, we can proceed to the RFC stage.
@Xuanwo I'm interest in this, how we should start?
We don't yet have a clear implementation strategy. Please conduct some research and initially propose your design. Then, we can proceed to the RFC stage.
I'm not sure what to propose RFC, but i think.
- In the file system that supports trash, we can support
restore(in the current yandex disk api we delete files directly by default, maybe we need to change the default delete behavior to trash). - In the supported version of the file system, We can support
restore_with_version.