Sync not working properly

Hi.

I am having a small problem with syncing to koofr. For some reason it does not detect whether something is a file or folder.

Example:
If I have a folder test on the remote and a file test locally, it will refuse to sync it with a 400 error. Likewise if I have the file test on the remove and the folder test locally, same issue.

Mounting koofr locally and running rsync works just fine, but it's just not what one would expect to have to do, since rclone should be able to deal with a sync request the proper way. Everything else works fine though. Removing deleted files from the remote, updating changes etc. But this scenario seams to create a conflict that rclone cannot deal with.

I am running rclone v1.53.3 on an ubuntu 22.04 server.

hello and welcome to the forum,

that is a very old version of rclone.

the only way to get the latest stable is at
https://rclone.org/install/#script-installation

Hi.

Tried looking it up on my main Arch machine, and your right. Typical Ubuntu to keep packing old stuff in their new releases. I will try updating this, and see if that helps.

Thanks.

here is the change log
https://rclone.org/changelog/

Well, update do the latest release and this did not do anything. Still having the same issue.

when you posted, there was a template of questions, now is the time to provide all the answers.

Not much in the log about this

rclone sync -vv -l /mnt/storage/ koofr:Sync
2022/06/16 05:57:06 ERROR : test: Failed to copy: Invalid response status! Got 400, expected [200]; headers: map[Content-Length:[0] Content-Type:[text/plain] Date:[Thu, 16 Jun 2022 05:57:05 GMT] X-Request-Id:[6671923d-8a30-422a-4564-89d4ec84bd1d] X-User-Id:[c32b42d4-592a-45be-9e17-0f9f4af0e8ce]], content: 
2022/06/16 05:57:06 ERROR : koofr:4b900217-5dc6-5ac2-9b1a-894b07afd46a:Sync/: not deleting files as there were IO errors
2022/06/16 05:57:06 ERROR : koofr:4b900217-5dc6-5ac2-9b1a-894b07afd46a:Sync/: not deleting directories as there were IO errors

This is trying to sync a file to the remote where there is currently a folder with the same name. Again, mounting it using rclone mount and running rsync works fine.

Can you run with -vv --dump bodies and post the output please?

Looks like rclone is sending something koofr doesn't understand.

Sure. This produced a lot more information.

Okay, so for this I created a test directory (Otherwise the output was to large to sort). On the remote I created koofr:Sync/TestFolder/ItemName/ where ItemName is a directory. On the local side I created /mnt/storage/TestFolder/ItemName where ItemName is a simple text file. I then ran the following:

rclone sync -vv --dump bodies -l /mnt/storage/TestFolder/ koofr:Sync/TestFolder/
2022/06/16 16:41:23 DEBUG : rclone: Version "v1.58.1" starting with parameters ["rclone" "sync" "-vv" "--dump" "bodies" "-l" "/mnt/storage/TestFolder/" "koofr:Sync/TestFolder/"]
2022/06/16 16:41:23 DEBUG : Creating backend with remote "/mnt/storage/TestFolder/"
2022/06/16 16:41:23 DEBUG : local: detected overridden config - adding "{b6816}" suffix to name
2022/06/16 16:41:23 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
2022/06/16 16:41:23 DEBUG : fs cache: renaming cache item "/mnt/storage/TestFolder/" to be canonical "local{b6816}:/mnt/storage/TestFolder/"
2022/06/16 16:41:23 DEBUG : Creating backend with remote "koofr:Sync/TestFolder/"
2022/06/16 16:41:23 DEBUG : You have specified to dump information. Please be noted that the Accept-Encoding as shown may not be correct in the request and the response may not show Content-Encoding if the go standard libraries auto gzip encoding was in effect. In this case the body of the request will be gunzipped before showing it.
2022/06/16 16:41:23 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:23 DEBUG : HTTP REQUEST (req 0x4000837300)
2022/06/16 16:41:23 DEBUG : GET /api/v2/mounts HTTP/1.1
Host: app.koofr.net
User-Agent: rclone/v1.58.1
Accept: application/json
Authorization: XXXX
Accept-Encoding: gzip

2022/06/16 16:41:23 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:23 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:23 DEBUG : HTTP RESPONSE (req 0x4000837300)
2022/06/16 16:41:23 DEBUG : HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8
Date: Thu, 16 Jun 2022 14:41:23 GMT
Vary: Accept-Encoding
X-Request-Id: 1431a8e7-c6af-4d04-6fe3-7226c5c3b89f
X-User-Id: c6cc5223-630d-b8d0-d3fd-07b9386c5647

476
{"mounts":[{"id":"93fc6941-b658-4817-af11-6e31baa635d6","name":"Koofr","type":"device","origin":"hosted","online":true,"owner":{"id":"c6cc5223-630d-b8d0-d3fd-07b9386c5647","name":"Daniel Bergløv","email":"d.bergloev@mailbox.org","permissions":{"COMMENT":true,"CREATE_LINK":true,"CREATE_RECEIVER":true,"MOUNT":true,"OWNER":true,"READ":true,"WRITE":true},"isGroup":false,"added":1635360017690},"users":[{"id":"c6cc5223-630d-b8d0-d3fd-07b9386c5647","name":"Daniel Bergløv","email":"d.bergloev@mailbox.org","permissions":{"COMMENT":true,"CREATE_LINK":true,"CREATE_RECEIVER":true,"MOUNT":true,"OWNER":true,"READ":true,"WRITE":true},"added":1635360017690}],"groups":[],"isShared":false,"permissions":{"COMMENT":true,"CREATE_LINK":true,"CREATE_RECEIVER":true,"MOUNT":true,"OWNER":true,"READ":true,"WRITE":true},"spaceTotal":112640,"spaceUsed":24691,"version":0,"isPrimary":true,"canWrite":true,"canUpload":true,"overQuota":false,"almostOverQuota":false,"userAdded":1635360017690,"capabilities":{"rawThumbnails":true,"externalLinks":false,"externalStatus":false,"officeOnline":true},"deviceId":"fdb3d390-8ee1-2e1c-c331-b4fe463634fa","isDir":true}]}
0

2022/06/16 16:41:23 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:23 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:23 DEBUG : HTTP REQUEST (req 0x4000470400)
2022/06/16 16:41:23 DEBUG : GET /api/v2/mounts/93fc6941-b658-4817-af11-6e31baa635d6/files/info?path=%2FSync%2FTestFolder%2F HTTP/1.1
Host: app.koofr.net
User-Agent: rclone/v1.58.1
Accept: application/json
Authorization: XXXX
Accept-Encoding: gzip

2022/06/16 16:41:23 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:23 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:23 DEBUG : HTTP RESPONSE (req 0x4000470400)
2022/06/16 16:41:23 DEBUG : HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8
Date: Thu, 16 Jun 2022 14:41:23 GMT
Vary: Accept-Encoding
X-Request-Id: 8fa5501b-8f48-4c52-6048-0d23d5dcb6d8
X-User-Id: c6cc5223-630d-b8d0-d3fd-07b9386c5647

5f
{"name":"TestFolder","type":"dir","modified":1655390342481,"size":0,"contentType":"","tags":{}}
0

2022/06/16 16:41:23 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:23 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:23 DEBUG : HTTP REQUEST (req 0x4000836100)
2022/06/16 16:41:23 DEBUG : GET /api/v2/mounts/93fc6941-b658-4817-af11-6e31baa635d6/files/list?path=%2FSync%2FTestFolder HTTP/1.1
Host: app.koofr.net
User-Agent: rclone/v1.58.1
Accept: application/json
Authorization: XXXX
Accept-Encoding: gzip

2022/06/16 16:41:23 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:23 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:23 DEBUG : HTTP RESPONSE (req 0x4000836100)
2022/06/16 16:41:23 DEBUG : HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8
Date: Thu, 16 Jun 2022 14:41:23 GMT
Vary: Accept-Encoding
X-Request-Id: ae1c37c1-de20-4f31-718b-53ce0e78d907
X-User-Id: c6cc5223-630d-b8d0-d3fd-07b9386c5647

69
{"files":[{"name":"ItemName","type":"dir","modified":1655390365379,"size":0,"contentType":"","tags":{}}]}
0

2022/06/16 16:41:23 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:23 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:23 DEBUG : HTTP REQUEST (req 0x4000836400)
2022/06/16 16:41:23 DEBUG : GET /api/v2/mounts/93fc6941-b658-4817-af11-6e31baa635d6/files/list?path=%2FSync%2FTestFolder%2FItemName HTTP/1.1
Host: app.koofr.net
User-Agent: rclone/v1.58.1
Accept: application/json
Authorization: XXXX
Accept-Encoding: gzip

2022/06/16 16:41:23 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:23 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:23 DEBUG : HTTP REQUEST (req 0x4000471500)
2022/06/16 16:41:23 DEBUG : GET /api/v2/mounts/93fc6941-b658-4817-af11-6e31baa635d6/files/info?path=%2FSync%2FTestFolder HTTP/1.1
Host: app.koofr.net
User-Agent: rclone/v1.58.1
Accept: application/json
Authorization: XXXX
Accept-Encoding: gzip

2022/06/16 16:41:23 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:23 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:23 DEBUG : HTTP RESPONSE (req 0x4000836400)
2022/06/16 16:41:23 DEBUG : HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8
Date: Thu, 16 Jun 2022 14:41:23 GMT
Vary: Accept-Encoding
X-Request-Id: 5f1e0c9d-6a3f-4af1-5436-a9b0b0effbc5
X-User-Id: c6cc5223-630d-b8d0-d3fd-07b9386c5647

c
{"files":[]}
0

2022/06/16 16:41:23 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:23 DEBUG : koofr:93fc6941-b658-4817-af11-6e31baa635d6:Sync/TestFolder/: Waiting for checks to finish
2022/06/16 16:41:23 DEBUG : koofr:93fc6941-b658-4817-af11-6e31baa635d6:Sync/TestFolder/: Waiting for transfers to finish
2022/06/16 16:41:23 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:23 DEBUG : HTTP RESPONSE (req 0x4000471500)
2022/06/16 16:41:23 DEBUG : HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8
Date: Thu, 16 Jun 2022 14:41:23 GMT
Vary: Accept-Encoding
X-Request-Id: 13407c52-5d26-466e-5d8b-e28a5d7a5665
X-User-Id: c6cc5223-630d-b8d0-d3fd-07b9386c5647

5f
{"name":"TestFolder","type":"dir","modified":1655390342481,"size":0,"contentType":"","tags":{}}
0

2022/06/16 16:41:23 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:23 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:23 DEBUG : HTTP REQUEST (req 0x4000471900)
2022/06/16 16:41:23 DEBUG : POST /content/api/v2/mounts/93fc6941-b658-4817-af11-6e31baa635d6/files/put?autorename=false&filename=ItemName&info=true&modified=1655390435049&overwrite=true&overwriteIgnoreNonexisting=&path=%2FSync%2FTestFolder HTTP/1.1
Host: app.koofr.net
User-Agent: rclone/v1.58.1
Transfer-Encoding: chunked
Accept: application/json
Authorization: XXXX
Content-Type: multipart/form-data; boundary=d09b405f78017d886445e29f97358c3f93002b6d79ed40661bbac5172fe6
Accept-Encoding: gzip

fc
--d09b405f78017d886445e29f97358c3f93002b6d79ed40661bbac5172fe6
Content-Disposition: form-data; name="file"; filename="dummy"
Content-Type: application/octet-stream

This is a test

--d09b405f78017d886445e29f97358c3f93002b6d79ed40661bbac5172fe6--

0

2022/06/16 16:41:23 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:24 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:24 DEBUG : HTTP RESPONSE (req 0x4000471900)
2022/06/16 16:41:24 DEBUG : HTTP/1.1 400 Bad Request
Content-Length: 0
Content-Type: text/plain
Date: Thu, 16 Jun 2022 16:41:23 GMT
X-Request-Id: 74aafb73-ff9e-4566-4db7-074b902a08e6
X-User-Id: c6cc5223-630d-b8d0-d3fd-07b9386c5647

2022/06/16 16:41:24 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:24 ERROR : ItemName: Failed to copy: Invalid response status! Got 400, expected [200]; headers: map[Content-Length:[0] Content-Type:[text/plain] Date:[Thu, 16 Jun 2022 16:41:23 GMT] X-Request-Id:[74aafb73-ff9e-4566-4db7-074b902a08e6] X-User-Id:[c6cc5223-630d-b8d0-d3fd-07b9386c5647]], content: 
2022/06/16 16:41:24 ERROR : koofr:93fc6941-b658-4817-af11-6e31baa635d6:Sync/TestFolder/: not deleting files as there were IO errors
2022/06/16 16:41:24 ERROR : koofr:93fc6941-b658-4817-af11-6e31baa635d6:Sync/TestFolder/: not deleting directories as there were IO errors
2022/06/16 16:41:24 ERROR : Attempt 1/3 failed with 1 errors and: Invalid response status! Got 400, expected [200]; headers: map[Content-Length:[0] Content-Type:[text/plain] Date:[Thu, 16 Jun 2022 16:41:23 GMT] X-Request-Id:[74aafb73-ff9e-4566-4db7-074b902a08e6] X-User-Id:[c6cc5223-630d-b8d0-d3fd-07b9386c5647]], content: 
2022/06/16 16:41:24 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:24 DEBUG : HTTP REQUEST (req 0x4000231e00)
2022/06/16 16:41:24 DEBUG : GET /api/v2/mounts/93fc6941-b658-4817-af11-6e31baa635d6/files/list?path=%2FSync%2FTestFolder HTTP/1.1
Host: app.koofr.net
User-Agent: rclone/v1.58.1
Accept: application/json
Authorization: XXXX
Accept-Encoding: gzip

2022/06/16 16:41:24 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:24 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:24 DEBUG : HTTP RESPONSE (req 0x4000231e00)
2022/06/16 16:41:24 DEBUG : HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8
Date: Thu, 16 Jun 2022 14:41:24 GMT
Vary: Accept-Encoding
X-Request-Id: 1a77b5c7-d6d2-4cf0-64e3-636cd6e00aee
X-User-Id: c6cc5223-630d-b8d0-d3fd-07b9386c5647

69
{"files":[{"name":"ItemName","type":"dir","modified":1655390365379,"size":0,"contentType":"","tags":{}}]}
0

2022/06/16 16:41:24 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:24 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:24 DEBUG : HTTP REQUEST (req 0x4000471a00)
2022/06/16 16:41:24 DEBUG : GET /api/v2/mounts/93fc6941-b658-4817-af11-6e31baa635d6/files/list?path=%2FSync%2FTestFolder%2FItemName HTTP/1.1
Host: app.koofr.net
User-Agent: rclone/v1.58.1
Accept: application/json
Authorization: XXXX
Accept-Encoding: gzip

2022/06/16 16:41:24 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:24 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:24 DEBUG : HTTP REQUEST (req 0x4000ba2100)
2022/06/16 16:41:24 DEBUG : GET /api/v2/mounts/93fc6941-b658-4817-af11-6e31baa635d6/files/info?path=%2FSync%2FTestFolder HTTP/1.1
Host: app.koofr.net
User-Agent: rclone/v1.58.1
Accept: application/json
Authorization: XXXX
Accept-Encoding: gzip

2022/06/16 16:41:24 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:24 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:24 DEBUG : HTTP RESPONSE (req 0x4000471a00)
2022/06/16 16:41:24 DEBUG : HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8
Date: Thu, 16 Jun 2022 14:41:24 GMT
Vary: Accept-Encoding
X-Request-Id: a9e7833b-884f-4aec-4d35-291196c2c9ce
X-User-Id: c6cc5223-630d-b8d0-d3fd-07b9386c5647

c
{"files":[]}
0

2022/06/16 16:41:24 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:24 DEBUG : koofr:93fc6941-b658-4817-af11-6e31baa635d6:Sync/TestFolder/: Waiting for checks to finish
2022/06/16 16:41:24 DEBUG : koofr:93fc6941-b658-4817-af11-6e31baa635d6:Sync/TestFolder/: Waiting for transfers to finish
2022/06/16 16:41:24 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:24 DEBUG : HTTP RESPONSE (req 0x4000ba2100)
2022/06/16 16:41:24 DEBUG : HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8
Date: Thu, 16 Jun 2022 14:41:24 GMT
Vary: Accept-Encoding
X-Request-Id: dcb2173b-b61c-4d0b-4a1b-85d34df81249
X-User-Id: c6cc5223-630d-b8d0-d3fd-07b9386c5647

5f
{"name":"TestFolder","type":"dir","modified":1655390342481,"size":0,"contentType":"","tags":{}}
0

2022/06/16 16:41:24 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:24 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:24 DEBUG : HTTP REQUEST (req 0x4000837200)
2022/06/16 16:41:24 DEBUG : POST /content/api/v2/mounts/93fc6941-b658-4817-af11-6e31baa635d6/files/put?autorename=false&filename=ItemName&info=true&modified=1655390435049&overwrite=true&overwriteIgnoreNonexisting=&path=%2FSync%2FTestFolder HTTP/1.1
Host: app.koofr.net
User-Agent: rclone/v1.58.1
Transfer-Encoding: chunked
Accept: application/json
Authorization: XXXX
Content-Type: multipart/form-data; boundary=f40f4322cfc64c8b1bdf22978b97991e95778ad4b731b0c4a7839b6d3317
Accept-Encoding: gzip

fc
--f40f4322cfc64c8b1bdf22978b97991e95778ad4b731b0c4a7839b6d3317
Content-Disposition: form-data; name="file"; filename="dummy"
Content-Type: application/octet-stream

This is a test

--f40f4322cfc64c8b1bdf22978b97991e95778ad4b731b0c4a7839b6d3317--

0

2022/06/16 16:41:24 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:24 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:24 DEBUG : HTTP RESPONSE (req 0x4000837200)
2022/06/16 16:41:24 DEBUG : HTTP/1.1 400 Bad Request
Content-Length: 0
Content-Type: text/plain
Date: Thu, 16 Jun 2022 16:41:24 GMT
X-Request-Id: f6a73d92-a7ed-4431-77ce-e9a71e61f631
X-User-Id: c6cc5223-630d-b8d0-d3fd-07b9386c5647

2022/06/16 16:41:24 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:24 ERROR : ItemName: Failed to copy: Invalid response status! Got 400, expected [200]; headers: map[Content-Length:[0] Content-Type:[text/plain] Date:[Thu, 16 Jun 2022 16:41:24 GMT] X-Request-Id:[f6a73d92-a7ed-4431-77ce-e9a71e61f631] X-User-Id:[c6cc5223-630d-b8d0-d3fd-07b9386c5647]], content: 
2022/06/16 16:41:24 ERROR : koofr:93fc6941-b658-4817-af11-6e31baa635d6:Sync/TestFolder/: not deleting files as there were IO errors
2022/06/16 16:41:24 ERROR : koofr:93fc6941-b658-4817-af11-6e31baa635d6:Sync/TestFolder/: not deleting directories as there were IO errors
2022/06/16 16:41:24 ERROR : Attempt 2/3 failed with 1 errors and: Invalid response status! Got 400, expected [200]; headers: map[Content-Length:[0] Content-Type:[text/plain] Date:[Thu, 16 Jun 2022 16:41:24 GMT] X-Request-Id:[f6a73d92-a7ed-4431-77ce-e9a71e61f631] X-User-Id:[c6cc5223-630d-b8d0-d3fd-07b9386c5647]], content: 
2022/06/16 16:41:24 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:24 DEBUG : HTTP REQUEST (req 0x4000837700)
2022/06/16 16:41:24 DEBUG : GET /api/v2/mounts/93fc6941-b658-4817-af11-6e31baa635d6/files/list?path=%2FSync%2FTestFolder HTTP/1.1
Host: app.koofr.net
User-Agent: rclone/v1.58.1
Accept: application/json
Authorization: XXXX
Accept-Encoding: gzip

2022/06/16 16:41:24 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:24 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:24 DEBUG : HTTP RESPONSE (req 0x4000837700)
2022/06/16 16:41:24 DEBUG : HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8
Date: Thu, 16 Jun 2022 14:41:24 GMT
Vary: Accept-Encoding
X-Request-Id: d02f3778-b3cb-46e1-5a8a-71c19451442d
X-User-Id: c6cc5223-630d-b8d0-d3fd-07b9386c5647

69
{"files":[{"name":"ItemName","type":"dir","modified":1655390365379,"size":0,"contentType":"","tags":{}}]}
0

2022/06/16 16:41:24 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:24 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:24 DEBUG : HTTP REQUEST (req 0x4000837900)
2022/06/16 16:41:24 DEBUG : GET /api/v2/mounts/93fc6941-b658-4817-af11-6e31baa635d6/files/list?path=%2FSync%2FTestFolder%2FItemName HTTP/1.1
Host: app.koofr.net
User-Agent: rclone/v1.58.1
Accept: application/json
Authorization: XXXX
Accept-Encoding: gzip

2022/06/16 16:41:24 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:24 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:24 DEBUG : HTTP REQUEST (req 0x4000837d00)
2022/06/16 16:41:24 DEBUG : GET /api/v2/mounts/93fc6941-b658-4817-af11-6e31baa635d6/files/info?path=%2FSync%2FTestFolder HTTP/1.1
Host: app.koofr.net
User-Agent: rclone/v1.58.1
Accept: application/json
Authorization: XXXX
Accept-Encoding: gzip

2022/06/16 16:41:24 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:24 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:24 DEBUG : HTTP RESPONSE (req 0x4000837d00)
2022/06/16 16:41:24 DEBUG : HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8
Date: Thu, 16 Jun 2022 14:41:24 GMT
Vary: Accept-Encoding
X-Request-Id: d05d4b0d-6cec-48a8-42e4-341bda5a96ce
X-User-Id: c6cc5223-630d-b8d0-d3fd-07b9386c5647

5f
{"name":"TestFolder","type":"dir","modified":1655390342481,"size":0,"contentType":"","tags":{}}
0

2022/06/16 16:41:24 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:24 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:24 DEBUG : HTTP REQUEST (req 0x4000884000)
2022/06/16 16:41:24 DEBUG : POST /content/api/v2/mounts/93fc6941-b658-4817-af11-6e31baa635d6/files/put?autorename=false&filename=ItemName&info=true&modified=1655390435049&overwrite=true&overwriteIgnoreNonexisting=&path=%2FSync%2FTestFolder HTTP/1.1
Host: app.koofr.net
User-Agent: rclone/v1.58.1
Transfer-Encoding: chunked
Accept: application/json
Authorization: XXXX
Content-Type: multipart/form-data; boundary=957f4a473be5d5270d54d7c9011cf3f9a573b4856d9b2ede453638dcacd1
Accept-Encoding: gzip

fc
--957f4a473be5d5270d54d7c9011cf3f9a573b4856d9b2ede453638dcacd1
Content-Disposition: form-data; name="file"; filename="dummy"
Content-Type: application/octet-stream

This is a test

--957f4a473be5d5270d54d7c9011cf3f9a573b4856d9b2ede453638dcacd1--

0

2022/06/16 16:41:24 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2022/06/16 16:41:24 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:24 DEBUG : HTTP RESPONSE (req 0x4000837900)
2022/06/16 16:41:24 DEBUG : HTTP/1.1 200 OK
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8
Date: Thu, 16 Jun 2022 14:41:24 GMT
Vary: Accept-Encoding
X-Request-Id: b36ad489-54f0-47ac-7608-51de5257e29c
X-User-Id: c6cc5223-630d-b8d0-d3fd-07b9386c5647

c
{"files":[]}
0

2022/06/16 16:41:24 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:24 DEBUG : koofr:93fc6941-b658-4817-af11-6e31baa635d6:Sync/TestFolder/: Waiting for checks to finish
2022/06/16 16:41:24 DEBUG : koofr:93fc6941-b658-4817-af11-6e31baa635d6:Sync/TestFolder/: Waiting for transfers to finish
2022/06/16 16:41:25 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:25 DEBUG : HTTP RESPONSE (req 0x4000884000)
2022/06/16 16:41:25 DEBUG : HTTP/1.1 400 Bad Request
Content-Length: 0
Content-Type: text/plain
Date: Thu, 16 Jun 2022 16:41:24 GMT
X-Request-Id: 9fc7d277-084e-4d64-5e43-cae9e2bf81ff
X-User-Id: c6cc5223-630d-b8d0-d3fd-07b9386c5647

2022/06/16 16:41:25 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2022/06/16 16:41:25 ERROR : ItemName: Failed to copy: Invalid response status! Got 400, expected [200]; headers: map[Content-Length:[0] Content-Type:[text/plain] Date:[Thu, 16 Jun 2022 16:41:24 GMT] X-Request-Id:[9fc7d277-084e-4d64-5e43-cae9e2bf81ff] X-User-Id:[c6cc5223-630d-b8d0-d3fd-07b9386c5647]], content: 
2022/06/16 16:41:25 ERROR : koofr:93fc6941-b658-4817-af11-6e31baa635d6:Sync/TestFolder/: not deleting files as there were IO errors
2022/06/16 16:41:25 ERROR : koofr:93fc6941-b658-4817-af11-6e31baa635d6:Sync/TestFolder/: not deleting directories as there were IO errors
2022/06/16 16:41:25 ERROR : Attempt 3/3 failed with 1 errors and: Invalid response status! Got 400, expected [200]; headers: map[Content-Length:[0] Content-Type:[text/plain] Date:[Thu, 16 Jun 2022 16:41:24 GMT] X-Request-Id:[9fc7d277-084e-4d64-5e43-cae9e2bf81ff] X-User-Id:[c6cc5223-630d-b8d0-d3fd-07b9386c5647]], content: 
2022/06/16 16:41:25 INFO  : 
Transferred:   	         45 B / 45 B, 100%, 29 B/s, ETA 0s
Errors:                 1 (retrying may help)
Elapsed time:         1.7s

2022/06/16 16:41:25 DEBUG : 7 go routines active
2022/06/16 16:41:25 Failed to sync: Invalid response status! Got 400, expected [200]; headers: map[Content-Length:[0] Content-Type:[text/plain] Date:[Thu, 16 Jun 2022 16:41:24 GMT] X-Request-Id:[9fc7d277-084e-4d64-5e43-cae9e2bf81ff] X-User-Id:[c6cc5223-630d-b8d0-d3fd-07b9386c5647]], content:

This is the bad request and response

Unfortunately the server wasn't very forthcoming about what happened, it just gave a 400 error.

I think it is trying to tell you, you are overwriting a directory with a file, but there is no proper error message!

Rclone isn't very good at overwriting folders with files and vice versa - it usually gives an error in the sync so I'm suprised not to see that here.

What do you get if you do? Can you post the output?

rclone lsf -R --disable ListR -vv koofr:Sync/TestFolder/

Sure.

2022/06/16 20:50:57 DEBUG : rclone: Version "v1.58.1" starting with parameters ["rclone" "lsf" "-R" "--disable" "ListR" "-vv" "koofr:Sync/TestFolder/"]
2022/06/16 20:50:57 DEBUG : Creating backend with remote "koofr:Sync/TestFolder/"
2022/06/16 20:50:57 DEBUG : Using config file from "~/.config/rclone/rclone.conf"
2022/06/16 20:50:58 DEBUG : Reset feature "ListR"
ItemName/
2022/06/16 20:50:58 DEBUG : 4 go routines active

I've looked into this a bit more.

Rclone can't and won't overwrite a directory with a file - that could lead to data loss.

However it should be giving a more helpful message - "can't overwrite directory with file"

and the fact that it isn't is a bug? Or is it.. In commit fs: Allow sync of a file and a directory with the same name · rclone/rclone@4b27c67 · GitHub we changed the routines to allow a sync of a file and a directory with the same name and now we are relying on the backends to tell us if they can't have a file and a directory of the same name.

If I try this on the local backend I get a relatively sensible error

file: Failed to copy: open /tmp/koofr-test/dst/file: is a directory

However koofr is giving a very poor error in this case!

So in summary, I don't think this is a bug, but the error message could be a lot better!

I ren

On purpose or not, I do still see this as a bug.

What I am trying to run is not copy but sync. As the docs itself states:

Sync (one way) mode to make a directory identical

A one way mode to make a directory identical. In such a mode everything in the target location should be completely discarded, unless it already matches the source. When using the sync command, you implicitly tell rclone that you do not care about the target. All that you want, is to have it match the source.

And there is no safety in this behavior. Many files does not per definition mean important files. A single file can easily be magnitudes more important than a directory with multiple files. Yet is has no problem deleting a single file that does not exist in the source.

Never the less, thanks for your time. At least now I know what is going on.

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