Sync not deleting files/folders at target

Hi,

I’m trying to sync my files and folders from gdrive to acd.

For this, I’m using this command:
DEBUG : rclone: Version "v1.35-116-g3ef9f6fβ" starting with parameters ["rclone" "sync" "-v" "-vv" "--log-file=/mnt/synclog.log" "gdrive_decrypted:/" "acd_decrypted:/"]

Files and folders are transfered correctly. But i expect that files and folders will be deleted on target, which don’t exist on gdrive. But this is not the case.

In the log I can see errors like this:
ERROR : Encrypted amazon drive root '': not deleting files as there were IO errors

Does anyone know what’s wrong?

I don’t know what is happening.
All files that should be deleted after sync are still visible on mount.
But if I do a “rclone ls” on the same folder, the files are gone.

Does anyone have or had similar issues? Why are the files visible on mount, but not on “rclone ls”? Is there some kind of “caching”?

Unmount and mount again

I already tried it.
Looking directly in my amazon drive, the encrypted files are still there.
So it seems that delete on sync doesn’t work :frowning:

By default rclone won’t delete any files until after the sync and the sync has run clean with no errors.

What rclone is saying there is that there were some errors in the sync so it isn’t deleting files.

Either try the sync again until it does run clean, or use the --delete-during flag which deletes stuff as it goes along. I recommend just retying the sync though.

ok I tried it with --delete-during but the result is the same

rclone sync -v --delete-during gdrive_decrypted: acd_decrypted:

As you can see, I don’t have erros anymore:

2017/02/20 21:43:38 INFO  : Encrypted amazon drive root '': Waiting for checks to finish
2017/02/20 21:43:38 INFO  : Encrypted amazon drive root '': Waiting for transfers to finish
2017/02/20 21:43:38 INFO  :
Transferred:      0 Bytes (0 Bytes/s)
Errors:                 0
Checks:            149031
Transferred:            0
Elapsed time:     47m0.2s

To be save, I remounted my ACD mount, but see the result:

root@Storage:/mnt/acd/rclone/decrypted/Nextcloud# ls -la
insgesamt 2
drwxr-xr-x 1 root root   0 Jan  1 15:43 appdata_ocl8s9c9cil3
drwxr-xr-x 1 root root   0 Jan 15 13:53 appdata_ocmkzvz0uh17
drwxr-xr-x 1 root root   0 Dez 31 16:04 appdata_ocnngo7en2is
drwxr-xr-x 1 root root   0 Dez 31 14:21 files_external
-rw-r--r-- 1 root root 284 Feb 19 10:23 .htaccess
-rw-r--r-- 1 root root 131 Feb 19 10:23 htaccesstest.txt
-rw-r--r-- 1 root root   0 Feb 19 10:23 index.html
drwxr-xr-x 1 root root   0 Dez 31 14:21 user1
drwxr-xr-x 1 root root   0 Feb 16 23:31 user2
-rw-r--r-- 1 root root 307 Feb 19 10:23 nextcloud.log
-rw-r--r-- 1 root root   0 Feb 19 10:23 .ocdata
drwxr-xr-x 1 root root   0 Dez 31 16:39 user3
-rw-r--r-- 1 root root   0 Feb  4 01:39 update.log
-rw-r--r-- 1 root root  57 Feb  4 01:39 updater.log
drwxr-xr-x 1 root root   0 Feb  4 01:39 updater-ocmkzvz0uh17


root@Storage:/mnt/gdrive/rclone/decrypted/Nextcloud# ls -la
insgesamt 2
drwxr-xr-x 1 root root   0 Jan 15 15:07 appdata_ocmkzvz0uh17
drwxr-xr-x 1 root root   0 Jan  1 17:58 files_external
-rw-r--r-- 1 root root 284 Dez 27 12:37 .htaccess
-rw-r--r-- 1 root root 131 Sep 19 12:57 htaccesstest.txt
-rw-r--r-- 1 root root   0 Dez 27 12:37 index.html
drwxr-xr-x 1 root root   0 Jan  1 17:58 user1
drwxr-xr-x 1 root root   0 Jan  1 17:58 user2
-rw-r--r-- 1 root root 307 Feb 18 10:22 nextcloud.log
-rw-r--r-- 1 root root   0 Dez 27 12:37 .ocdata
drwxr-xr-x 1 root root   0 Jan  1 17:59 user3
-rw-r--r-- 1 root root   0 Dez 31 14:21 update.log
-rw-r--r-- 1 root root  57 Dez 31 14:21 updater.log
drwxr-xr-x 1 root root   0 Jan 19 23:19 updater-ocmkzvz0uh17

I don’t have an idea anymore :frowning:

Are the differences empty directories?

rclone doesn’t tidy up empty directories at the moment. See: https://github.com/ncw/rclone/issues/100

Thank you.
You were right, these were just empty directories.
Fixed it with rclone rmdirs

1 Like

Bumping because I recently had some similar problem. I'm using nextcloud v16.0.1 and the deletions wouldn't sync because some files had commas in its names (because of an earlier command I ran on the host machine that went wrong and created files "3,", "nextcloud.log,", etc). Those files were causing IO errors on each deletion, and after manually deleting them by sshing to the host, the sync completed successfully. I guess its a problem caused by the http request or something, don't really know.

Please do not bump year old threads. Make a new thread and file a bug.