I've just noticed a strange quirk of using rsync to mirror my music
drive between two pCP devices: filenames with special characters seem to
display differently on the target drive. This surprised me because both
machines are virtually identical regarding OS, hardware, etc. I'm
looking for help to understand what's happening.
The setup:
The 'Source' machine is a Pi4 running 64-bit pCP (fresh install, not an
in-situ upgrade). It has an ext4 disk mounted as /mnt/Music. The
partitioning and formatting was done using fdisk under pCP.
The 'Target' machine is almost identical - only the Pi memory is
different (RPi4 4GB for the source, RPi4 1GB for the target). It was
also a fresh install. Its ext4 disk is mounted as /mnt/MusicMirror.
I'm using rsync over ssh to mirror /mnt/Music on the source machine to
/mnt/MusicMirror on the target:
Code:
--------------------
rsync -avhiO --delete --modify-window=1 --exclude=lost+found -e ssh
[email protected]:/mnt/Music/ /mnt/MusicMirror/
--------------------
I did not specify any character set conversion because I assumed that
the matching hardware and software, and the 'archive' mode of rsync,
would ensure that the mirror would be an identical copy. But if I look
at what rsync does with an example folder with a special character, it
is clear that something is happening.
Code:
--------------------
rsync -avhiO --delete --modify-window=1 --exclude=lost+found -e ssh
[email protected]:/mnt/Music/ /mnt/MusicMirror/
receiving incremental file list
.
.
.
cd+++++++++ Music/Lossless/Album FLACs/m/Michael Bubl\#303\#251/Love (Deluxe)/
--------------------
Furthermore, a directory listing on the source machine shows the
accented character:
Code:
--------------------
drwxrwxrwx 4 tc staff 4096 Jul 13 2019 Michael Bublé/
--------------------
whereas on the target machine it doesn't:
Code:
--------------------
drwxrwxrwx 4 tc staff 4096 Jan 20 15:00 'Michael Bubl'$'\303\251'/
--------------------
In fact, all directories, except those without spaces or special
characters, are listed on the target inside quotes. I'm using a normal
terminal shell on a Macbook, and on the source machine the directory
names are displayed in blue, whereas those on the target, inside quotes,
are shown in plain black text. I don't know the significance of the
coloured text in the shell, but clearly the directory names are being
interpreted differently on the target.
I had a quick go with the '--no-iconv' option, and also with
'--iconv=iso88591,iso88591' (since both machines apparently use
'G_FILENAME_ENCODING='iso8859-1'. Neither option made any difference.
How can I make the target identical to the source?
------------------------------------------------------------------------
chill's Profile: http://forums.slimdevices.com/member.php?userid=10839
View this thread: http://forums.slimdevices.com/showthread.php?t=113676
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix