opendal icon indicating copy to clipboard operation
opendal copied to clipboard

feature requests: Add `undelete` support

Open Xuanwo opened this issue 1 year ago • 4 comments

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: delete delete_marker for an object, delete_marker should be fetched via list_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.

Xuanwo avatar Mar 05 '24 09:03 Xuanwo

Maybe also related to https://github.com/apache/opendal/issues/4032

Xuanwo avatar Mar 05 '24 09:03 Xuanwo

@Xuanwo I'm interest in this, how we should start?

hoslo avatar Mar 08 '24 10:03 hoslo

@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 avatar Mar 08 '24 10:03 Xuanwo

@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.

hoslo avatar Mar 18 '24 06:03 hoslo