Sync problems from macOS to ROCK

I’m trying to setup a proper sync procedure for my local iTunes library to the ROCK installation on my NUC. My iTunes library lives in the standard folder ~/Music/iTunes on my local APFS volume. I connect the NUC via SMB from the Finder. Then I tried to mirror my iTunes Music folder to the NUC with Carbon Copy Cloner, ChronoSync and Rsync. In all cases I have the problem that updating the NUC with new music a lot of additonal tracks are deleted and recopied. I found, that only tracks are affected that have non-ASCII characters in their filenames. All sync tools seem to see different files.

Comparing the file listings from both sides in the terminal with ls | xxd shows me different encoded diacritics.

That’s the hex output from the ls command of the SMB share of ROCK:

00000260: 722e 6d34 610a 3338 2d30 3820 416e 746f r.m4a.38-08 Anto
00000270: 6e69 cc81 6e20 4476 6f72 cc8c 61cc 816b ni..n Dvor..a..k
00000280: 5f20 5275 7361 6c6b 6120 2d20 536f 6e67 _ Rusalka - Song
00000290: 2074 6f20 7468 6520 4d6f 6f6e 2e6d 3461 to the Moon.m4a
000002a0: 0a33 382d 3039 2047 6961 636f 6d6f 2050 .38-09 Giacomo P
000002b0: 7563 6369 6e69 5f20 4c61 2042 6f68 65cc uccini_ La Bohe.
000002c0: 806d 6520 2d20 5175 616e 646f 206d 656e .me - Quando men
000002d0: 2076 6f2e 6d34 610a 4963 6f6e 0d0a      vo.m4a.Icon..

And here from the Mac:

00000260: 6d34 610a 3338 2d30 3820 416e 746f 6ec3 m4a.38-08 Anton.
00000270: ad6e 2044 766f c599 c3a1 6b5f 2052 7573 .n Dvo....k_ Rus
00000280: 616c 6b61 202d 2053 6f6e 6720 746f 2074 alka - Song to t
00000290: 6865 204d 6f6f 6e2e 6d34 610a 3338 2d30 he Moon.m4a.38-0
000002a0: 3920 4769 6163 6f6d 6f20 5075 6363 696e 9 Giacomo Puccin
000002b0: 695f 204c 6120 426f 68c3 a86d 6520 2d20 i_ La - 
000002c0: 5175 616e 646f 206d 656e 2076 6f2e 6d34 Quando men vo.m4
000002d0: 610a 4963 6f6e 0d0a                     a.Icon..

Look at “Dvo…k” which is Dvořák

With this in mind I installed rsync3 to get use of the --iconv parameter. First I tried --iconv=uft8-mac,utf8 as I’ve found some tips on the Internet. But that didn’t help. After a frustrating hour I tried the stupid looking parameter --iconv=uft8-mac,utf8-mac and boom that was the solution.

It seems that ROCK is trying to do some magic which Rsync does not detect automatically to get the directory comparison right.

I contacted the developer of Carbon Copy Cloner who never got a report of this strange behaviour.

So maybe the tools are all right but the Linux in ROCK is configured very uncommon. Can the developers give some more details what they have done here?

other than unix extensions = no, the smbd on Roon OS does not do anything non-stock related to encodings.

Hi Danny, thanks for your answer. On which distribution (version) ROCk is based on exactly?

@danny. The tool developers think that the smb server could be misconfigured. Can you post the smb.conf file or tell me how to access it by myself?

    workgroup = WORKGROUP
    dns proxy = no
    syslog = 0
    guest account = root
    security = user
    map to guest = Bad User
    cache directory = /var/run/samba
    state directory = /var/run/samba
    lock directory = /var/run/samba
    private dir = /var/run/samba
    pid directory = /var/run
    guest account = root
    printcap name = /dev/null
    log file = /dev/null
    unix extensions = no
    max protocol = SMB2

    path = /roon/data
    guest ok = yes
    directory mask = 0775
    create mask = 0755
    read only = no
    follow symlinks = yes
    wide links = yes

Great, thanks.