-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
rclone sync --create-empty-src-dirs to b2 doesn't create empty directories #8414
Comments
Empty directories are not supported by B2. You can switch to S3 compatibility layer and use https://rclone.org/s3/#s3-directory-markers |
I see... Thanks for the information. Can rclone do something on its side, e.g., upload directory markers like on S3 (or files with the UX-wise, an error message when trying to use |
It seems it's not a drop-in solution, because it started reuploading and replacing many terabytes of my data, and I'm not sure why. After a file is uploaded via b2, the b2 remote shows its mtime, but the s3 remote shows the upload time. After the same file is reuploaded via s3, they switch: b2 shows the upload time, and s3 shows the actual mtime. Edit: that's why: |
You could use https://rclone.org/docs/#modify-window-time
Or maybe not.. Indeed it looks like you have to plan which API you are using from the start. |
No, not at all, it's not a matter of 1 ms, the upload timestamp and the mtime of the file can be years or even decades apart. When the file is uploaded via the b2 remote, b2 shows mtime, and s3 shows the upload date. When I start syncing via the s3 remote, rclone doesn't see the mtimes set in X-Bz-Info-src_last_modified_millis, because it queries X-Amz-Meta-Mtime, so it starts reuploading all files. Even worse, as I have versions enabled for my bucket, the paycheck will double until the old versions are cleaned up.
Yeah, better luck next time 😅 Back on topic, there are two things that can be done on rclone side: directory markers for b2 (I guess, it should be doable, because I see b2 understands directory markers created with s3), and better UX for the messages (may be not needed if directory markers are implemented). What do you think? |
https://www.backblaze.com/docs/cloud-storage-files#file-names "File names cannot start with /, end with /, or contain //." Which means that it can not use the same method as used for S3 where marker ends with Somebody would have to investigate it further I guess. I wonder if creating some hidden empty file would be acceptable solution.. It would "create" these dirs. |
Hmm, I wonder then:
Even if so, there are still two alternatives possible:
(For this example, naming was chosen to resemble |
What is the problem you are having with rclone?
I have a crypt remote called b2enc over a b2 remote called b2.
rclone sync --create-empty-src-dirs
to b2enc seems to have no effect on empty directories. When Irclone mount b2enc:
, these directories don't show up. With rclone 1.68.2, sync silently ignores them and doesn't create them on remote. With rclone 1.69.1, sync prints messages like these, but still the directories are not created:What is your rclone version (output from
rclone version
)Which OS you are using and how many bits (e.g. Windows 7, 64 bit)
Arch Linux, 64-bit
Which cloud storage system are you using? (e.g. Google Drive)
Backblaze
The command you were trying to run (e.g.
rclone copy /tmp remote:tmp
)A log from the command with the
-vv
flag (e.g. output fromrclone -vv copy /tmp remote:tmp
)How to use GitHub
The text was updated successfully, but these errors were encountered: