mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2026-04-25 21:35:58 +03:00
[GH-ISSUE #312] Support for deep directory rename #161
Labels
No labels
bug
bug
dataloss
duplicate
enhancement
feature request
help wanted
invalid
need info
performance
pull-request
question
question
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/s3fs-fuse#161
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @saurabhdas on GitHub (Dec 4, 2015).
Original GitHub issue: https://github.com/s3fs-fuse/s3fs-fuse/issues/312
Hello,
Thank you for this wonderful project!
The FAQ says:
Is there any plan to support feature this in the future?
@sqlbot commented on GitHub (Dec 4, 2015):
I can't speak for the developers, but the core problem, the way I see it, is that the limitation is primarily one of the underlying service -- Amazon S3 -- which, itself, doesn't support renaming a "directory" at all. S3 isn't actually hierarchical, and files are not "contained" in folders in S3 -- the folders appear essentially as an artifact of the
/delimiter being used in the file path... so it's not that S3 won't let you rename the "container" (folder) -- it's that there's no actual container to rename.To rename an entire hierarchy of files in S3 requires sending put/copy (to the new path) requests and delete (from the old path) requests for every single object in the chain. If there are a million files, that's roughly 2 million API requests (fewer with batch deletes, but more when the files are large, because 5GB files require multipart operations).
@RobbKistler commented on GitHub (Dec 4, 2015):
I think the FAQ is out of date. s3fs-fuse has code that will do the deep rename, but it has to recursively rename all of the objects. It might not be fast, but it should work. It uses server-side copies for renames, so the objects don't necessarily have to make a round-trip.
@saurabhdas commented on GitHub (Dec 5, 2015):
Thanks for clearing that up @RobbKistler . A recursive rename of all objects is a workable solution in this case - slow is fine as long as files don't inadvertently go missing.
I'll close this issue. Perhaps the FAQ should be updated too.
Thanks again for all the good work here :)
@RobbKistler commented on GitHub (Dec 5, 2015):
@ggtakec I took the liberty of updating the FAQ. I removed the Q/A about directory rename not working. It seems to work fine. Is this OK?
@ggtakec commented on GitHub (Dec 20, 2015):
@RobbKistler thanks for updating FAQ.
The renaming dir should be running normally. FAQ has remained old.
Regards,