I am trying to build a storage server with rclone on S3 with a sftp gateway and an encryption layer.
And I realized that, unlike Google Drive, when you are deleting a file on such a system, you lost it forever, and there is no way you can recover it if the deletion is a misoperation.
Is it possible to create a trash provider that moves files into a trash directory when they are deleted?
For example, when path-to-file is deleted, the file is actually moved to .trash/path-to-file/timestamp, and you will have a chance to manually recover it until you use cleanup command.
hello and welcome to the forum,
that has already been discussed in the forum, did you try to search fo it?
Thank you for letting me know!
I tried to search for it on this forum and among GitHub Issues, but most of them are about the trash can of Google Drive.
I'll try again.
you want a trashcan for s3 storage or for sftp storage?
For the sftp server launched by "rclone serve sftp"
This is my current rclone configuration:
(client) > sftp server > crypt > s3
And this is what I wish to have:
(client) > sftp server > trash > crypt > s3
where would the trashcan files be stored, s3, sftp or what?
On encrypted S3, I think.
I wish it could work on another provider specified in the config like what cache and crypt do.
The idea is that trash layer should be transparent for most of the actions to its next layer except deletion out of trash dir.
When a file out of trash dir is deleted, it should convert the deletion to a move action and apply it on its next layer.
what s3 provider do you plan to use?
s3 does not support move, so a file/folder will have to be server-side copied, then deleted.
you will be charged for the storage and api fees.
Oh I didn't know that...
I thought move only cost one request on S3 (within the same bucket).
It still worth for me though, since most of my files are small and accidentally deleting an entire directory would be super annoying.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.