Rclone sync empty folders

Hi,

I have been trying to sync my local folder to a google bucket storage. It does not seem to sync the empty folders despite using the option --create-empty-src-dirs

The verbose log does say that it is Creating directories, but it does not.

In the following log, the directories that are empty are mt2,mt3 which dont get created on the google bucket.

2019/04/16 05:44:05 DEBUG : rclone: Version "v1.47.0" starting with parameters ["rclone-v1.47.0-linux-amd64/rclone" "sync" "--create-empty-src-dirs" "-vv" "--config" "/src/gcnew.conf" "/src/fsroot" "mylabs:mylabs-rem_file_server/fsroot"]
2019/04/16 05:44:05 DEBUG : Using config file from "/src/gcnew.conf"
2019/04/16 05:44:07 DEBUG : Skitch-2.8.zip: Size and modification time the same (differ by 0s, within tolerance 1ns)
2019/04/16 05:44:07 DEBUG : Skitch-2.8.zip: Unchanged skipping
2019/04/16 05:44:07 DEBUG : aaa: Size and modification time the same (differ by 0s, within tolerance 1ns)
2019/04/16 05:44:07 DEBUG : aaa: Unchanged skipping
2019/04/16 05:44:07 DEBUG : test.json: Size and modification time the same (differ by 0s, within tolerance 1ns)
2019/04/16 05:44:07 DEBUG : test.json: Unchanged skipping
2019/04/16 05:44:07 DEBUG : clone_dir/test.json: Size and modification time the same (differ by 0s, within tolerance 1ns)
2019/04/16 05:44:07 DEBUG : clone_dir/test.json: Unchanged skipping
2019/04/16 05:44:07 DEBUG : 345/test.json: Size and modification time the same (differ by 0s, within tolerance 1ns)
2019/04/16 05:44:07 DEBUG : 345/test.json: Unchanged skipping
2019/04/16 05:44:07 INFO  : Storage bucket mylabs-rem_file_server path fsroot/: Waiting for checks to finish
2019/04/16 05:44:07 INFO  : Storage bucket mylabs-rem_file_server path fsroot/: Waiting for transfers to finish
2019/04/16 05:44:08 INFO  : mt1/aaa: Copied (new)
2019/04/16 05:44:08 DEBUG : mt2: Making directory
2019/04/16 05:44:08 DEBUG : mt3: Making directory
2019/04/16 05:44:08 DEBUG : Storage bucket mylabs-rem_file_server path fsroot/: copied 2 directories
2019/04/16 05:44:08 INFO  : Waiting for deletions to finish
2019/04/16 05:44:08 INFO  :
Transferred:                 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 0
Checks:                 5 / 5, 100%
Transferred:            1 / 1, 100%
Elapsed time:        2.7s

2019/04/16 05:44:08 DEBUG : 10 go routines active
2019/04/16 05:44:08 DEBUG : rclone: Version "v1.47.0" finishing with parameters ["rclone-v1.47.0-linux-amd64/rclone" "sync" "--create-empty-src-dirs" "-vv" "--config" "/src/gcnew.conf" "/src/fsroot" "mylabs:mylabs-rem_file_server/fsroot"]

Google buckets don’t actually support directories at all, only files, hence empty directories don’t exist. Some tools create a zero sized file called dir/ but rclone doesn’t do that.

Thanks.
That explains why even gsutil rsync also ignores the empty directories.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.