-
Notifications
You must be signed in to change notification settings - Fork 39
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
rclonesync does not sync empty directories #63
Comments
That's unfortunate. I wonder if any --rclone-args can be discarded for the rclone LSLs. |
I guess global flags would still be expected to be passed on to all subcommands. Subcommand-specific flags like |
The problem is rooted in rclonesync specifically and only working on files. File differences are found and propagated to the other side. A parallel algorithm would have to be implemented to check for directory differences (specifically empty directory adds and deletes) and propagate those to the other side. A not-very-robust workaround is to do a an I'll leave this open for the record. Its a limitation. |
This sequence may get you close to what you need
The filtering in line 2 first includes all directories in path1, and then excludes everything else in path1. The empty directories in path1 are created on path2. The limitation is that empty directories only accumulate, and must be manually deleted on both sides. You could use rlconesync's |
Is there any way to automatically delete empty directories on the remote that aren't present on local storage? I ended up with a ton of them and I think I'm getting throttled when doing rclone lsl on the remote because it takes more than an hour. Update: I managed to delete them using the web interface of the cloud service, sorting by content size. It would still be nice if the program could delete empty directories on one path when they're deleted on the other. |
Did you try the --remove-empty-directories switch? |
Thanks! Sorry for bumping this issue, I found it before reading the documentation when searching for my problem. |
When syncing a local directory with a (Google Drive) remote, empty directories that exist either on Path1 or Path2 are not being created on the other. While for "end user files" this behavior might be acceptable, especially folder structures that belong to programs might expect empty directories to be in place.
Edit: Adding
--rclone-args --create-empty-src-dirs
as last parameter unfortunately does not solve the issue, as--create-empty-src-dirs
is not a global rclone parameter. This results inrclone lsl
returning an error.The text was updated successfully, but these errors were encountered: