Sync problem with empty remote dirs

What is the problem you are having with rclone?

According to Commands
sync does:
Make source and dest identical, modifying destination only.
They are not identical since when I delete a directory locally,
I expect not to end up with an empty directory on the other side.
(That is not "identical" to me.)

I also looked if there was a command to fix that, but --delete-empty-src-dirs
only seems to work for the source side.
So I was hoping to find a --delete-empty-dest-dirs. Is there something like that?

What is your rclone version (output from rclone version)

rclone v1.55.1

  • os/type: darwin
  • os/arch: arm64
  • go/version: go1.16.3
  • go/linking: dynamic
  • go/tags: cmount

Which OS you are using and how many bits (eg Windows 7, 64 bit)

Mac OS Big Sur (on M1)

Which cloud storage system are you using? (eg Google Drive)

OneDrive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

./Applications/RClone/rclone sync --delete-during -v -P /Users/marcelloh/stack remote:stack

The rclone config contents with secrets removed.

[remote]
type = onedrive
region = global
token = {"access_token":"","expiry":"2021-06-25T15:46:27.450714+02:00"}
drive_id = hidden
drive_type = business

Not sending avery huge log, because thats not the point.

It already deletes empty directories on the destination and that's in the log file you'd have.

felix@gemini:~/test$ rclone sync /home/felix/test/source/ /home/felix/test/dest/ --dry-run
2021/06/25 09:16:08 NOTICE: hosts: Skipped copy as --dry-run is set (size 130)
2021/06/25 09:16:08 NOTICE: empty: Skipped remove directory as --dry-run is set
2021/06/25 09:16:08 NOTICE:
Transferred:   	       130 / 130 Bytes, 100%, 291.901 kBytes/s, ETA 0s
Deleted:                0 (files), 1 (dirs)
Transferred:            1 / 1, 100%
Elapsed time:         0.1s

and

felix@gemini:~/test$ rclone sync /home/felix/test/source/ /home/felix/test/dest/ -vv
2021/06/25 09:16:50 DEBUG : Using config file from "/opt/rclone/rclone.conf"
2021/06/25 09:16:50 DEBUG : rclone: Version "v1.55.1" starting with parameters ["rclone" "sync" "/home/felix/test/source/" "/home/felix/test/dest/" "-vv"]
2021/06/25 09:16:50 DEBUG : Creating backend with remote "/home/felix/test/source/"
2021/06/25 09:16:50 DEBUG : Creating backend with remote "/home/felix/test/dest/"
2021/06/25 09:16:50 DEBUG : Local file system at /home/felix/test/dest/: Waiting for checks to finish
2021/06/25 09:16:50 DEBUG : Local file system at /home/felix/test/dest/: Waiting for transfers to finish
2021/06/25 09:16:50 DEBUG : hosts: MD5 = 38b847bf753f092fa1fac6e5e4018155 OK
2021/06/25 09:16:50 INFO  : hosts: Copied (new)
2021/06/25 09:16:50 DEBUG : Waiting for deletions to finish
2021/06/25 09:16:50 DEBUG : empty: Removing directory
2021/06/25 09:16:50 DEBUG : Local file system at /home/felix/test/dest/: deleted 1 directories
2021/06/25 09:16:50 INFO  :
Transferred:   	       130 / 130 Bytes, 100%, 159.950 kBytes/s, ETA 0s
Deleted:                0 (files), 1 (dirs)
Transferred:            1 / 1, 100%
Elapsed time:         0.0s

2021/06/25 09:16:50 DEBUG : 3 go routines active

That's why we ask for the log file as all the juicy stuff is in there.

Then you'll have to way a couple of days :slight_smile: because it takes a long time.
But the strange thing is, that I can see that files are deleted during, but the folders aren't so thats why I asked the question. Is that the way it works
"--delete-during" is only for files? (because that is not cleat for what I understood)

delete-during is for files that are being transferred so it removes them after being transferred.

directory deletion happens at the end and that's all in the log once it's done.

Thanks for the explanation. It would have been nice if the deletion was done if the directory was in sync
(and left empty)
Now iI have to wait a long time to see it happen.
I did this once, but it kept on running until I shut it down, and then it obviously doesn't delete those empty folders.
I don't know where to find the logfiles, or that I need to do something for that to have those logfiles.

An example with a log file:

felix@gemini:~/test$ rclone sync /home/felix/test/source/ /home/felix/test/dest/ -vv --log-file /tmp/rclone.log
felix@gemini:~/test$ cat /tmp/rclone.log
2021/06/25 11:00:17 DEBUG : Using config file from "/opt/rclone/rclone.conf"
2021/06/25 11:00:17 DEBUG : rclone: Version "v1.55.1" starting with parameters ["rclone" "sync" "/home/felix/test/source/" "/home/felix/test/dest/" "-vv" "--log-file" "/tmp/rclone.log"]
2021/06/25 11:00:17 DEBUG : Creating backend with remote "/home/felix/test/source/"
2021/06/25 11:00:17 DEBUG : Creating backend with remote "/home/felix/test/dest/"
2021/06/25 11:00:17 DEBUG : Local file system at /home/felix/test/dest/: Waiting for checks to finish
2021/06/25 11:00:17 DEBUG : hosts: Size and modification time the same (differ by 0s, within tolerance 1ns)
2021/06/25 11:00:17 DEBUG : hosts: Unchanged skipping
2021/06/25 11:00:17 DEBUG : Local file system at /home/felix/test/dest/: Waiting for transfers to finish
2021/06/25 11:00:17 DEBUG : Waiting for deletions to finish
2021/06/25 11:00:17 INFO  : There was nothing to transfer
2021/06/25 11:00:17 INFO  :
Transferred:   	         0 / 0 Bytes, -, 0 Bytes/s, ETA -
Checks:                 1 / 1, 100%
Elapsed time:         0.0s

2021/06/25 11:00:17 DEBUG : 2 go routines active

thanks. Had a restart and see it logs :slight_smile:

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