I was about to diff a backup from it's source to manually verify that the data is correct. Some chars, like , is not shown correctly on the original data but as the clients (over samba) interpret it correctly it's nothing to worry about. The data restored from backup shows the chars correctly, leading diff to not consider them to be the same files (with diffs, but rather completely different files). md5 sums, same file but different name.# md5sum /original/iStock_000003637083Large-barn*e37c34968dd145a0e25692e1cb7fbdb1  /original/iStock_000003637083Large-barn p? strand.jpg# md5sum /frombackup/iStock_000003637083Large-barn*e37c34968dd145a0e25692e1cb7fbdb1  /frombackup/iStock_000003637083Large-barn p strand.jpgMount options and filesystems/dev/sdb1 on /original type ext4 (rw,noatime,errors=remount-ro)/dev/sdc1 on /frombackup type ext4 (rw)LocaleLANG=sv_SE.UTF-8LANGUAGE=LC_CTYPE=sv_SE.UTF-8LC_NUMERIC=sv_SE.UTF-8LC_TIME=sv_SE.UTF-8LC_COLLATE=sv_SE.UTF-8LC_MONETARY=sv_SE.UTF-8LC_MESSAGES=sv_SE.UTF-8LC_PAPER=sv_SE.UTF-8LC_NAME=sv_SE.UTF-8LC_ADDRESS=sv_SE.UTF-8LC_TELEPHONE=sv_SE.UTF-8LC_MEASUREMENT=sv_SE.UTF-8LC_IDENTIFICATION=sv_SE.UTF-8LC_ALL=od -c# ls /original/iStock_000003637083Large-barn p strand.jpg | od -c0000000   /   v   a   r   /   w   w   w   /   m   e   d   i   a   b   a0000020   n   k   e   n   _   i   m   a   g   e   s   /   k   u   n   d0000040   i   d   8   0   /   _   B   a   r   n   /   i   S   t   o   c0000060   k   _   0   0   0   0   0   3   6   3   7   0   8   3   L   a0000100   r   g   e   -   b   a   r   n       p 345       s   t   r   a0000120   n   d   .   j   p   g  \n0000127# ls /frombackup/iStock_000003637083Large-barn p strand.jpg | od -c0000000   /   d   a   t   a   /   v   a   r   /   w   w   w   /   m   e0000020   d   i   a   b   a   n   k   e   n   _   i   m   a   g   e   s0000040   /   k   u   n   d   i   d   8   0   /   _   B   a   r   n   /0000060   i   S   t   o   c   k   _   0   0   0   0   0   3   6   3   70000100   0   8   3   L   a   r   g   e   -   b   a   r   n       p 3030000120 245       s   t   r   a   n   d   .   j   p   g  \n0000135
Same file, different filename due to encoding problem?
linux;diff;character encoding
Unix filesystems tend to be locale-agnostic in the sense that file names consist of bytes and it's the application's business to decide what those bytes mean if they fall outside the ASCII range. The convention on unix today is to encode filenames and everything else in UTF-8, apart from some legacy environments (mostly Asian). Windows filesystems, on the other hand, tend to have an encoding that is specified in the filesystem properties.If you need to work with filenames in a different encoding, create a translated view of that filesystem with convmvfs. Seeworking with filenames in a different encoding over sshIt appears that your original system has filenames encoded in latin-1. Your current system uses UTF-8, and the one-byte sequence representing  in latin-1 (\345) is an invalid sequence in UTF-8 which ls prints as ?. Your backup process has somehow resulted in filenames encoded in UTF-8. Samba translates filenames based on its configuration.To access the original files with your native encoding, make a recoded view:mkdir /original-recodedconvmvfs -o icharset=LATIN1,ocharset=UTF8 /original /original-recodeddiff -r /original-recoded /frombackup(You may need other options depending on what permissions and ownership you want to obtain.)