Problem with symlinks and --links

I am using rclone on an android phone (Termux) and synching to WebDav on a synology NAS.
rclone version 1.55.0-DEV

Everything works great except for symlinks when using the --links directive
--copy-links works fine but I don't want to copy the contents of all symbolics

My rclone command line is:

rclone sync /data/data/com.termux/files FilesWebdav:termux/termux --progress --backup-dir FilesWebdav:termux/termux_archived/$now2 --log-file=/data/data/com.termux/files/home/${now2}_termux.log --log-level=INFO --create-empty-src-dirs --links

Every symlink fails in the same way. Using --copy-links with the same command works fine so the problem is purely due to the attempt to re-draft the symlinks per --links

A segment of the output log is below

2021/04/26 22:58:46 INFO  : usr/share/man/man3/CURLOPT_XFERINFODATA.3.gz: Copied (new)
2021/04/26 22:58:46 INFO  : usr/share/man/man3/CURLOPT_XFERINFOFUNCTION.3.gz: Copied (new)
2021/04/26 22:58:46 INFO  : usr/share/man/man3/CURLOPT_XOAUTH2_BEARER.3.gz: Copied (new)
2021/04/26 22:59:23 ERROR : usr/share/man/man3/ESCDELAY.3ncurses.gz.rclonelink: Failed to copy: Put "https://molemoor.synology.me:5006/Fileshares/termux/termux/usr/share/man/man3/ESCDELAY.3ncurses.gz.rclonelink": net/http: HTTP/1.x transport connection broken: http: ContentLength=30 with Body length 28
2021/04/26 22:59:24 ERROR : usr/share/man/man3/LINES.3ncurses.gz.rclonelink: Failed to copy: Put "https://molemoor.synology.me:5006/Fileshares/termux/termux/usr/share/man/man3/LINES.3ncurses.gz.rclonelink": net/http: HTTP/1.x transport connection broken: http: ContentLength=30 with Body length 28
2021/04/26 22:59:29 ERROR : usr/share/man/man3/PAIR_NUMBER.3ncurses.gz.rclonelink: Failed to copy: Put "https://molemoor.synology.me:5006/Fileshares/termux/termux/usr/share/man/man3/PAIR_NUMBER.3ncurses.gz.rclonelink": net/http: HTTP/1.x transport connection broken: http: ContentLength=22 with Body length 17
2021/04/26 22:59:31 ERROR : usr/share/man/man3/PC.3ncurses.gz.rclonelink: Failed to copy: Put "https://molemoor.synology.me:5006/Fileshares/termux/termux/usr/share/man/man3/PC.3ncurses.gz.rclonelink": net/http: HTTP/1.x transport connection broken: http: ContentLength=22 with Body length 19
2021/04/26 23:01:05 ERROR : usr/share/man/man3/SP.3ncurses.gz.rclonelink: Failed to copy: Put "https://molemoor.synology.me:5006/Fileshares/termux/termux/usr/share/man/man3/SP.3ncurses.gz.rclonelink": net/http: HTTP/1.x transport connection broken: http: ContentLength=34 with Body length 30
2021/04/26 23:01:06 ERROR : usr/share/man/man3/TABSIZE.3ncurses.gz.rclonelink: Failed to copy: Put "https://molemoor.synology.me:5006/Fileshares/termux/termux/usr/share/man/man3/TABSIZE.3ncurses.gz.rclonelink": net/http: HTTP/1.x transport connection broken: http: ContentLength=30 with Body length 28
2021/04/26 23:01:12 ERROR : usr/share/man/man3/TYPE_ALNUM.3form.gz.rclonelink: Failed to copy: Put "https://molemoor.synology.me:5006/Fileshares/termux/termux/usr/share/man/man3/TYPE_ALNUM.3form.gz.rclonelink": net/http: HTTP/1.x transport connection broken: http: ContentLength=26 with Body length 23
2021/04/26 23:01:13 ERROR : usr/share/man/man3/TYPE_ALPHA.3form.gz.rclonelink: Failed to copy: Put "https://molemoor.synology.me:5006/Fileshares/termux/termux/usr/share/man/man3/TYPE_ALPHA.3form.gz.rclonelink": net/http: HTTP/1.x transport connection broken: http: ContentLength=26 with Body length 23
2021/04/26 23:10:11 ERROR : usr/share/man/man3/_tracedump.3ncurses.gz.rclonelink: Failed to copy: Put "https://molemoor.synology.me:5006/Fileshares/termux/termux/usr/share/man/man3/_tracedump.3ncurses.gz.rclonelink": net/http: HTTP/1.x transport connection broken: http: ContentLength=22 with Body length 17
2021/04/26 23:10:12 ERROR : usr/share/man/man3/_tracemouse.3ncurses.gz.rclonelink: Failed to copy: Put "https://molemoor.synology.me:5006/Fileshares/termux/termux/usr/share/man/man3/_tracemouse.3ncurses.gz.rclonelink": net/http: HTTP/1.x transport connection broken: http: ContentLength=22 with Body length 17
2021/04/26 23:10:19 INFO  : usr/share/man/man3/add_wch.3ncurses.gz: Copied (new)
2021/04/26 23:10:19 INFO  : usr/share/man/man3/add_wchstr.3ncurses.gz: Copied (new)
2021/04/26 23:10:21 INFO  : usr/share/man/man3/addch.3ncurses.gz: Copied (new)
2021/04/26 23:10:22 INFO  : usr/share/man/man3/addchstr.3ncurses.gz: Copied (new)
2021/04/26 23:11:06 ERROR : usr/share/man/man3/acs_map.3ncurses.gz.rclonelink: Failed to copy: Put "https://molemoor.synology.me:5006/Fileshares/termux/termux/usr/share/man/man3/acs_map.3ncurses.gz.rclonelink": net/http: HTTP/1.x transport connection broken: http: ContentLength=34 with Body length 30
2021/04/26 23:11:15 ERROR : usr/share/man/man3/add_wchnstr.3ncurses.gz.rclonelink: Failed to copy: Put "https://molemoor.synology.me:5006/Fileshares/termux/termux/usr/share/man/man3/add_wchnstr.3ncurses.gz.rclonelink": net/http: HTTP/1.x transport connection broken: http: ContentLength=26 with Body length 22
2021/04/26 23:11:18 ERROR : usr/share/man/man3/addchnstr.3ncurses.gz.rclonelink: Failed to copy: Put "https://molemoor.synology.me:5006/Fileshares/termux/termux/usr/share/man/man3/addchnstr.3ncurses.gz.rclonelink": net/http: HTTP/1.x transport connection broken: http: ContentLength=22 with Body length 20
2021/04/26 23:11:23 INFO  : usr/share/man/man3/addstr.3ncurses.gz: Copied (new)
2021/04/26 23:11:24 INFO  : usr/share/man/man3/addwstr.3ncurses.gz: Copied (new)

What this looks like is that the size rclone calculated for the symlink and the size actually read are different.

Which is super weird.

Can you do this to one of those files

rclone --links lsl /data/data/com.termux/files/usr/share/man/man3/CURLOPT_XFERINFODATA.3.gz

And

rclone --links cat /data/data/com.termux/files/usr/share/man/man3/CURLOPT_XFERINFODATA.3.gz | wc

rclone --links cat /data/data/com.termux/files/usr/share/man/man3/CURLOPT_XFERINFODATA.3.gz | hd

You might need to install hd/hexdump

The only way I can think that this is a problem is if the link has NUL characters on the end or something like that.

You could also try copying a single one of those links with -vv --dump bodies and posting the result.

No idea what any of it means but here goes

$ rclone --links lsl /data/data/com.termux/files/usr/share/man/man3/CURLOPT_XFERINFODATA.3.gz

  926 2021-04-21 12:19:49.427802238 CURLOPT_XFERINFODATA.3.gz

$ rclone --links cat /data/data/com.termux/files/usr/share/man/man3/CURLOPT_XFERINFODATA.3.gz | wc
6 21 926

$ rclone --links cat /data/data/com.termux/files/usr/share/man/man3/CURLOPT_XFERINFODATA.3.gz | hexdump

0000000 8b1f 0808 fe02 601a 0300 5543 4c52 504f
0000010 5f54 4658 5245 4e49 4f46 4144 4154 332e
0000020 ad00 d154 9b6e 104a e77d 462b 25f4 2889
0000030 49a4 b4ab 46f7 25d5 6e0e 2950 8058 5ad3
0000040 84b2 5816 b6c2 166b 8bb1 4b13 f8f9 02ce
0000050 6e6e 48d2 43cd f1b1 78c2 ce66 d999 6b33
0000060 4daf fa38 976b eb61 f074 2bc7 ee1b 2f0c
0000070 f75c 8b41 7c4e 85a7 3e7a cb20 61ee 60fc
0000080 1ae0 17d7 3940 10f0 9f75 c21d a28b e1ee
0000090 8860 26ca 73ac 9cfd 2f65 5b80 926b c7fa
00000a0 c1d1 4ceb a23f 8c65 e29c a267 75dd a6ec
00000b0 7056 3b30 3784 3e1f 87bc 70d7 fc72 cce6
00000c0 4b82 30d2 21ca b451 69c9 6377 79c1 5839
00000d0 abfe ddc9 2d9d 47e9 a80b c202 47ed d309
00000e0 499a a290 b752 a3a4 cf80 159c 91b4 04b4
00000f0 a122 b2a4 58e8 2f8e 01ac 5355 18a8 30a7
0000100 168b 3f2b 64fc 6dc1 8acd ca7a 13b3 c83d
0000110 f45a 84bc 6c9a 7429 a0b4 3b6c 69a6 a749
0000120 5440 0198 97f3 2a4c d9cc 262b 1b1a 29e1
0000130 da28 e46d 4694 2093 0a5c 5b20 38c2 11c9
0000140 288e 95a8 e56a 8e3f f453 c71d 9c4a 1452
0000150 29d2 adf6 6bb0 79b5 d552 d90a c86c 440e
0000160 40ab e809 b525 fb40 b05b 2511 f4ab 2d8a
0000170 6342 e7db c99c 7ada 85a0 4d80 88e9 240e
0000180 7ce5 874a 8ca1 b1ca 0a04 d4c9 4b2d 427b
0000190 ec8b d299 148b d48d b768 d8b5 723c b6c4
00001a0 894e beaa 106b db0e 7e82 c0a5 5bc6 37d0
00001b0 ed25 ff06 11a1 947b cba9 cb43 b0ff 0f65
00001c0 4bdc 0d10 02b2 4dd3 4fc0 c84c 6489 82d2
00001d0 7eaf 157a 532d eaf8 b1c6 a61b 882b e0e6
00001e0 ab86 df29 3f67 44bc 306d ed44 de80 1db5
00001f0 c895 03a2 69b6 a339 23e5 bff0 e93a 9d86
0000200 c15e 196c d107 cd22 cdbe d8bd e70f a5d1
0000210 ba9b 0a70 2866 74b6 4283 e386 16b7 fc2a
0000220 d8e4 9304 5cb3 004b ecce 77b3 36b6 b7e8
0000230 128c cbb9 5524 b37a 46f1 495d 30d3 e4ec
0000240 420a 8bf7 3c67 b00b 0d7e 2f45 6e15 2b54
0000250 8358 478d 4a91 ee39 ee8b db7e 9b89 0fa1
0000260 e105 273c 8fc5 5f21 0ab2 45a3 27e2 2bc6
0000270 14d6 2fbc 9c29 066b 2ea3 8feb 80c6 0855
0000280 3fb4 7625 ffa0 a381 151a 51c3 cf38 b271
0000290 2b60 0958 1347 c3a1 077f 4bc8 992f fec5
00002a0 f522 d0a3 2058 2045 aeb0 c9fc 5d67 902d
00002b0 0e2d 2dc8 1ce3 8a72 525a 2fa2 beb4 1df2
00002c0 bbec a835 ac74 870e 1c71 4ee3 832a 3774
00002d0 86fd 6a36 dc3f d5bf 238c 53a0 5aab 3e43
00002e0 3ca5 865f cd33 e0ea 10f4 d869 3186 12c8
00002f0 28bf c23f 2219 a855 ffa1 2e05 e8e2 ec53
0000300 8925 75ae 341f 3856 9777 6a41 a3e8 a4a0
0000310 e915 82b9 e12d fd3d 6475 f9e0 3641 6f54
0000320 be12 cb84 1820 3103 1a61 a2cd 3120 3d5c
0000330 68a9 bef1 5fb9 8116 3c67 2f3d 4ea6 8538
0000340 afb3 eab1 629b 3738 3886 daf7 03f5 c2f7
0000350 fc0f 6574 65b8 1e39 6778 e9f6 7d89 383c
0000360 5ec4 8cba b843 8376 67a5 54c4 18e1 61cb
0000370 bd13 fa2c 783c 8998 81e7 241b aa11 22fa
0000380 6dfe f783 02dd 4b13 c0b7 e5fc ed70 17c5
0000390 e251 eded 4fc6 b4f8 4dd7 0750 0000
000039e

I'm not sure how to do the -vv --dump part, but if you send a command line I'll try that.

Bearing in mind I am following instructions robotically :upside_down_face: and /data/data/com.termux/files/usr/share/man/man3/CURLOPT_XFERINFODATA.3.gz was one of the items in the log is not on an ERROR line

  • CURLOPT_XFERINFODATA.3.gz is not a symlink
  • LINES.3ncurses.gz is a symlink

Repeating with one of the symlinks in case that was intended..

rclone --links lsl /data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz

Gives no output at all

rclone --links cat /data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz | wc

0 0 0

rclone --links cat /data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz | hexdump

gives no output at all

This is where that particular symlink points

$ ls -l ESCDELAY.3ncurses.gz
lrwxrwxrwx 1 u0_a311 u0_a311 30 Apr 21 13:19 ESCDELAY.3ncurses.gz -> curses_variables.3ncurses.gz

Yes it was - well spotted.

I think you'll have to put .rclonelink on the end of the link names above and it should output something.

This is the dump test you could try. No guarantees the command line is correct since I'm typing on my phone!

This should copy a single symlink to the remote storage

rclone copy --links -vv --dump bodies /data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz.rclonelink FilesWebdav:termux/test --retries 1

Thanks for your help here. Not sure these are going to help but here goes:

a) rclone --links lsl /data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz.rclonelink
2021/04/28 12:28:07 ERROR : : error listing: directory not found
2021/04/28 12:28:07 Failed to lsl with 2 errors: last error was: directory not found

b) rclone --links cat /data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz.rclonelink | wc
2021/04/28 12:29:55 ERROR : : error listing: directory not found
2021/04/28 12:29:55 Failed to cat with 2 errors: last error was: directory not found
      0       0       0

 c) rclone --links cat /data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz.rclonelink | hexdump
2021/04/28 12:30:59 ERROR : : error listing: directory not found
2021/04/28 12:30:59 Failed to cat with 2 errors: last error was: directory not found

d) rclone copy --links -vv --dump bodies /data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz.rclonelink FilesWebdav:termux/test --retries 1
e) rclone copy --links -vv --dump bodies /data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz.rclonelink FilesWebdav:termux/test --retries 1
2021/04/28 12:30:59 ERROR : : error listing: directory not found
2021/04/28 12:30:59 Failed to cat with 2 errors: last error was: directory not found
~/.shortcuts $ rclone copy --links -vv --dump bodies /data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz.rclonelink FilesWebdav:termux/test --retries 1
Enter configuration password:
password:
2021/04/28 12:32:03 DEBUG : Using config file from "/data/data/com.termux/files/home/.config/rclone/rclone.conf"
2021/04/28 12:32:03 DEBUG : rclone: Version "v1.55.0-DEV" starting with parameters ["rclone" "copy" "--links" "-vv" "--dump" "bodies" "/data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz.rclonelink" "FilesWebdav:termux/test" "--retries" "1"]
2021/04/28 12:32:03 DEBUG : Creating backend with remote "/data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz.rclonelink"
2021/04/28 12:32:03 DEBUG : local: detected overridden config - adding "{b6816}" suffix to name
2021/04/28 12:32:03 DEBUG : fs cache: renaming cache item "/data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz.rclonelink" to be canonical "local{b6816}:/data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz.rclonelink"
2021/04/28 12:32:03 DEBUG : Creating backend with remote "FilesWebdav:termux/test"
2021/04/28 12:32:03 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.
2021/04/28 12:32:03 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2021/04/28 12:32:03 DEBUG : HTTP REQUEST (req 0x400066f500)
2021/04/28 12:32:03 DEBUG : PROPFIND /Fileshares/termux/test HTTP/1.1
Host: molemoor.synology.me:5006
User-Agent: rclone/v1.55.0-DEV
Authorization: XXXX
Depth: 1
Referer: https://molemoor.synology.me:5006/Fileshares/
Accept-Encoding: gzip

2021/04/28 12:32:03 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2021/04/28 12:32:03 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2021/04/28 12:32:03 DEBUG : HTTP RESPONSE (req 0x400066f500)
2021/04/28 12:32:03 DEBUG : HTTP/1.1 404 Not Found
Content-Length: 196
Content-Type: text/html; charset=iso-8859-1
Date: Wed, 28 Apr 2021 12:31:58 GMT
Server: Apache

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
</body></html>
2021/04/28 12:32:03 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2021/04/28 12:32:03 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2021/04/28 12:32:03 DEBUG : HTTP REQUEST (req 0x400066e700)
2021/04/28 12:32:03 DEBUG : PROPFIND /Fileshares/termux/test/ HTTP/1.1
Host: molemoor.synology.me:5006
User-Agent: rclone/v1.55.0-DEV
Authorization: XXXX
Depth: 1
Referer: https://molemoor.synology.me:5006/Fileshares/
Accept-Encoding: gzip

2021/04/28 12:32:03 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2021/04/28 12:32:03 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2021/04/28 12:32:03 DEBUG : HTTP RESPONSE (req 0x400066e700)
2021/04/28 12:32:03 DEBUG : HTTP/1.1 404 Not Found
Content-Length: 196
Content-Type: text/html; charset=iso-8859-1
Date: Wed, 28 Apr 2021 12:31:58 GMT
Server: Apache

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
</body></html>
2021/04/28 12:32:03 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2021/04/28 12:32:03 ERROR : : error reading source directory: directory not found
2021/04/28 12:32:03 DEBUG : webdav root 'termux/test': Waiting for checks to finish
2021/04/28 12:32:03 DEBUG : webdav root 'termux/test': Waiting for transfers to finish
2021/04/28 12:32:03 ERROR : Attempt 1/1 failed with 1 errors and: directory not found
2021/04/28 12:32:03 INFO  :
Transferred:             0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Elapsed time:         4.8s
2021/04/28 12:32:03 DEBUG : 4 go routines active
2021/04/28 12:32:03 Failed to copy: directory not found


ata/com.termux/files/home/.config/rclone/rclone.conf"
2021/04/28 12:33:48 DEBUG : rclone: Version "v1.55.0-DEV" starting with parameters ["rclone" "copy" "--links" "-vv" "--dump" "bodies" "/data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz" "FilesWebdav:termux/test" "--retries" "1"]
2021/04/28 12:33:48 DEBUG : Creating backend with remote "/data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz"
2021/04/28 12:33:48 DEBUG : local: detected overridden config - adding "{b6816}" suffix to name
2021/04/28 12:33:48 DEBUG : fs cache: adding new entry for parent of "/data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz", "local{b6816}:/data/data/com.termux/files/usr/share/man/man3"
2021/04/28 12:33:48 DEBUG : Creating backend with remote "FilesWebdav:termux/test"
2021/04/28 12:33:48 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.
2021/04/28 12:33:48 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2021/04/28 12:33:48 DEBUG : HTTP REQUEST (req 0x40004cfc00)
2021/04/28 12:33:48 DEBUG : PROPFIND /Fileshares/termux/test HTTP/1.1
Host: molemoor.synology.me:5006
User-Agent: rclone/v1.55.0-DEV
Authorization: XXXX
Depth: 1
Referer: https://molemoor.synology.me:5006/Fileshares/
Accept-Encoding: gzip

2021/04/28 12:33:48 DEBUG : >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
2021/04/28 12:33:49 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2021/04/28 12:33:49 DEBUG : HTTP RESPONSE (req 0x40004cfc00)
2021/04/28 12:33:49 DEBUG : HTTP/1.1 404 Not Found
Content-Length: 196
Content-Type: text/html; charset=iso-8859-1
Date: Wed, 28 Apr 2021 12:33:44 GMT
Server: Apache

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
</body></html>
2021/04/28 12:33:49 DEBUG : <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
2021/04/28 12:33:49 ERROR : Attempt 1/1 failed with 1 errors and: object not found
2021/04/28 12:33:49 INFO  :
Transferred:             0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors:                 1 (retrying may help)
Elapsed time:         5.0s
2021/04/28 12:33:49 DEBUG : 4 go routines active
2021/04/28 12:33:49 Failed to copy: object not found

Hmm, that didn't work as expected! My mistake - I forgot that there is a little bug in rclone which means naming symlinks on the command line is a bit hit and miss.

Can you try this instead

rclone copy --links -vv --dump bodies /data/data/com.termux/files/usr/share/man/man3/ --include "ESCDELAY.3ncurses.gz.rclonelink"  FilesWebdav:termux/test --retries 1

Which should hopefully just copy one file and it should be found this time. If the file isn't found can you adjust the path or the include so it does find one or more files?

This should fail the same way your original post did, but give a lot more debug.

OK, I can't capture the screen output of that because it is gigantic

However here is the top and tail of the log dump (with a few 1000 lines cut out where shown):

myout.txt (42.4 KB)

I can see the errors but I can't see what I really wanted to see which was the http transaction - I think this failed before even sending the http transaction.

OK try this to list the link

rclone lsl --links -vv /data/data/com.termux/files/usr/share/man/man3/ --include ESCDELAY.3ncurses.gz.rclonelink --retries 1 --low-level-retries 1 --log-file=./myout-lsl.txt

And then this to read its contents

rclone cat --links -vv /data/data/com.termux/files/usr/share/man/man3/ --include ESCDELAY.3ncurses.gz.rclonelink --retries 1 --low-level-retries 1 --log-file=./myout-cat.txt | hexdump -C

Hopefully both of those will show something!

Here you go: :slightly_smiling_face:

myout-cat.txt (189.2 KB) myout-lsl.txt (189.2 KB)

I suspect the hexdump bit didn't do its dumping (as both outputs are similar), but I'm mostly a windows person so will need to do some serious research to redraft the command...

But this is the screen output of the hexdump one:

$ rclone cat --links -vv /data/data/com.termux/files/usr/share/man/man3/ --include ESCDELAY.3ncurses.gz.rclonelink --retries 1 --low-level-retries 1 --log-file=./myout-cat.txt | hexdump -C Enter configuration password: password:00000000 63 75 72 73 65 73 5f 76 61 72 69 61 62 6c 65 73 |curses_variables| 00000010 2e 33 6e 63 75 72 73 65 73 2e 67 7a |.3ncurses.gz| 0000001c

Was there no screen output from the lsl test that didn't go in the log file? I was expecting to see a listing with a single file in it.

That hexdump looks fine when re-arranged a bit. It should be the destination of the ESCDELAY.3ncurses.gz link and it looks sensible.

00000000 63 75 72 73 65 73 5f 76 61 72 69 61 62 6c 65 73 |curses_variables|
00000010 2e 33 6e 63 75 72 73 65 73 2e 67 7a             |.3ncurses.gz|
0000001c

If you can get me the non log output of the lsl test then we'll have the pieces of the puzzle hopefully!

a) The screen output of the lsl

30 2021-04-21 12:19:50.244468986 ESCDELAY.3ncurses.gz.rclonelink

In the meantime I can report the following

b) I tried to create a new simplified source containing just a few symlinks, both to folders and to individual files, and all the symlink names a single word. Both types of symlinks carry the problem.

c) I then tried to change the destination from WebDav to Google Drive, and the problem and error messages are the same, so it's not a webdav-specific problem.

d) I tried to use copy instead of sync, no difference.

The runs complete with a number of errors equal to the number of symlinks, and in the destination no sign of the symlinks.

I wonder if this could be something specific to Termux (this is an unaltered Termux install apart from a few aliases added)?

That is the problem...

In the cat output above the symlink had 28 characters curses_variables.3ncurses.gz but it is listing as 30.

That is 100% consistent with the errors you've been getting

2021/04/26 22:59:23 ERROR : usr/share/man/man3/ESCDELAY.3ncurses.gz.rclonelink: Failed to copy: Put "https://molemoor.synology.me:5006/Fileshares/termux/termux/usr/share/man/man3/ESCDELAY.3ncurses.gz.rclonelink": net/http: HTTP/1.x transport connection broken: http: ContentLength=30 with Body length 28

Now what causes that problem? I'm not sure!

Can you run the cat and the lsl tests with this test binary please and post the logs.

You'll find an android binary in the testbuilds subdirectory. You'll have to pick one to match your device. If you aren't sure try the armv8a one and if that doesn't work try the armv7a one. You'll need to gunzip the builds - you can use wget to download them straight to the phone and then gunzip them, something like

wget https://beta.rclone.org/branch/fix-local-symlink/v1.56.0-beta.5461.1dc58a924.fix-local-symlink/testbuilds/rclone-android-21-armv8a.gz
gunzip rclone-android-21-armv8a.gz
./rclone-android-21-armv8a version

v1.56.0-beta.5461.1dc58a924.fix-local-symlink on branch fix-local-symlink (uploaded in 15-30 mins)

~/rctest $ ./rclone-android-21-armv8a version

rclone v1.56.0-beta.5461.1dc58a924.fix-local-symlink
- os/version: unknown
- os/kernel: 4.14.117-perf+ (aarch64)
- os/type: android
- os/arch: arm64
- go/version: go1.14.15
- go/linking: dynamic
- go/tags: none

~/rctest $ ./rclone-android-21-armv8a lsl --links -vv /data/data/com.termux/files/usr/share/man/man3/ --include ESCDELAY.3ncurses.gz.rclonelink --retries 1 --low-level-retries 1 --log-file=./myout-lsl.txt

Enter configuration password:
password:       30 2021-04-21 12:19:50.244468986 ESCDELAY.3ncurses.gz.rclonelink

~/rctest $ ./rclone-android-21-armv8a cat --links -vv /data/data/com.termux/files/usr/share/man/man3/ --include ESCDELAY.3ncurses.gz.rclonelink --retries 1 --low-level-retries 1 --log-file=./myout-cat.txt | hexdump -C

Enter configuration password:
password:00000000  63 75 72 73 65 73 5f 76  61 72 69 61 62 6c 65 73  |curses_variables|
00000010  2e 33 6e 63 75 72 73 65  73 2e 67 7a              |.3ncurses.gz|
0000001c

myout-cat.txt (195.2 KB) myout-lsl.txt (195.0 KB)

OK that is interesting - rclone never read the file to read the size in the lsl - I think it must be relying on the directory listing size.

What does this say

ls -l /data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz.rclonelink

I bet it gives a size of 30 rather than the 28 bytes the link really is.

Presuming you didn't mean the rclonelink extension

~/rctest $ ls -l /data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz

lrwxrwxrwx 1 u0_a311 u0_a311 30 Apr 21 13:19 /data/data/com.termux/files/usr/share/man/man3/ESCDELAY.3ncurses.gz -> curses_variables.3ncurses.gz

Thanks.

That confirms the problem.

This is an problem with the file system your phone user. Or rather an unexpected outcome.

I think I can fix this by reading the link to find the size. I'm not quite sure why that isn't happening already.

I'll post a binary for you to try tomorrow.

Can you post the result of the mount command or if that doesn't work "cat /proc/mounts" so I can see what file system you are using - thanks.

I've just realised that there is an option which will fix this for you.

Try your sync with the --local-zero-size-links option. Probably not the best named option in the world, but that will make rclone read the links rather than just looking at their size in the listing.

Yes, --links --local-zero-size-links solves it

Mount shows system is Ext4

So maybe --links should incorporate whatever --local-zero-size-links does

(and thank you for this great software)