-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bucket Based Remotes: empty directories #3453
Comments
I think we should probably do 1. first - no flag needed. As for 2. rclone mostly just contents itself with ignoring the 0 length directory files other programs make. Making rclone actively put them in would be quite a lot of work so if we want to do it, should probably be in phase 2. I think it needs a backend flag so you can set it on a per backend basis. Unifying code between BBR backends will be important! There are 6 BBR b2, s3, gcs, swift, qingstor, azureblob. It is possible to get free accounts for all of those except for gcs and azureblob. (you can test s3 against minio or alibabacloud). gcs has a free tier and azureblob may too. Signing up for free services will probably mean putting your credit card in though! I'd love to have your help with this :-) |
besides for the azureblob, b2, s3, gcs, swift, qingstor that are bucket based googlephotos and hubic do not have the empty directory flag set: |
Right now on BBR in order to not support empty directories,i would like to make the same goes for does this sound reasonable? |
rclone/fs/operations/operations.go Lines 1316 to 1324 in 693112d
|
hubic is a thin wrapper around swift so that is correct. I think the google photos is a mistake - you can have empty directories. |
If the directory doesn't exist when we do I think returning an error will break too much stuff - we want the directory made, we don't want an error returned saying that we can't make the directory. |
That is so we do as much as possible and report a failure at the end.
Hmm, have you got a demo I can try for this? |
exactly.
i agree, just this is limiting i am not sure which way to go here. |
try running the S3 integration tests on https://github.com/yparitcher/rclone/tree/BBR-empty-dir also BBR give different behavior when run from the root or from a bucket you caught most of them in #3421 however some tests i had to change to work when running from a bucket, as the tests were designed for root |
I backup my postgres db directory to s3 storage with rclone, today I have verify the backup, it is broken because lose some empty directory like I like support empty directories on BBR via a hidden empty file the full log
|
- Report correct feature flag - Fix test failures due to that - don't output the root directory marker - Don't create the directory marker if it is the bucket or root - Create directories when uploading files
- Report correct feature flag - Fix test failures due to that - don't output the root directory marker - Don't create the directory marker if it is the bucket or root - Create directories when uploading files
- Report correct feature flag - Fix test failures due to that - don't output the root directory marker - Don't create the directory marker if it is the bucket or root - Create directories when uploading files
Use Update to upload the directory markers
Use Update to upload the directory markers
Use Update to upload the directory markers
Use Update to upload the directory markers
* Support --swift-directory-markers for creation of Swift directory markers * Update TestSwiftAIO to allow retries
* Support --swift-directory-markers for creation of Swift directory markers * Update TestSwiftAIO to allow retries
* Support --swift-directory-markers for creation of Swift directory markers * Update TestSwiftAIO to allow retries
* master: (51 commits) build(deps): bump github.com/cloudflare/circl from 1.1.0 to 1.3.3 sftp: don't check remote points to a file if it ends with / sftp: don't stat directories before listing them pikpak: set the NoMultiThreading feature flag to disable multi-thread copy operations: Don't use multi-thread copy if the backend doesn't support it rclone#6915 fs: add new backend feature NoMultiThreading ftp: Fix "501 Not a valid pathname." errors when creating directories ftp: fix "unsupported LIST line" errors on startup Add Janne Hellsten to contributors operations: implement uploads to temp name with --inplace to disable fs: Implement PartialUploads feature flag sftp: fix move to allow overwriting existing files fs: when creating new fs.OverrideRemotes don't layer overrides if not needed fs: fix String() method on fs.OverrideRemote uptobox: add --uptobox-private flag to make all uploaded files private azureblob: empty directory markers rclone#3453 gcs: fix directory marker code rclone#3453 s3: fix directory marker code rclone#3453 azureblob: fix azure blob uploads with multiple bits of metadata Add Andrei Smirnov to contributors ...
* Support --swift-directory-markers for creation of Swift directory markers * Update TestSwiftAIO to support multiple test runs
- Report correct feature flag - Fix test failures due to that - don't output the root directory marker - Don't create the directory marker if it is the bucket or root - Create directories when uploading files
- Report correct feature flag - Fix test failures due to that - don't output the root directory marker - Don't create the directory marker if it is the bucket or root - Create directories when uploading files
Use Update to upload the directory markers
Use Update to upload the directory markers
We now have these to support empty directory markers
This covers the major bucket based backends. I'm going to close this now. We might do |
* Support --swift-directory-markers for creation of Swift directory markers * Update TestSwiftAIO to support multiple test runs
* Support --swift-directory-markers for creation of Swift directory markers * Update TestSwiftAIO to support multiple test runs
please add |
Progress
Current Situation:
Rclone does not officially support empty directories on BBR, however as many parts of the rclone api use file based systems there are many edge cases where rclone acts as if empty directories exist on BBR.
this causes non existent paths to be validated as rclone cant tell the difference between them and empty directories. this can cause inconsistencies with
mount
etc.this has been discussed before, see #3427 #3415
Proposed solutions:
1. enforce non support of empty directories on BBR:
mount
and similar commands which expect a filesystem (empty directories)2. support empty directories on BBR via a hidden empty file:
mount
) work better3. 1 & 2 via a flag:
if i missed anything please comment and i will add them in.
this will be a significant decision. rclone should have an policy which will help unified implementations for different backends.
i do not mind helping will this but it will definitely require help from many people.
thanks to all those that have made these remotes work until now
@ncw Please review
The text was updated successfully, but these errors were encountered: