I have a filesystem with some old files, which were probably copied there with some windows encoding in filenames (and not UTF8). When I try to backup them to samba share (Hetzner Storage Box) via CIFS-mounted filesystem, the files are created, but are not accessible in any way. The only way to remove them is via other means (like SFTP access to the share). I am using rdiff-backup, but the same happens with rsync or plain cp.
Original file:
-rwxr-xr-x 1 www-data www-data 2082 May 21 2010 ./domain/old/images/images2010/news/53x53_A?istýjrancejevonku.jpg
File on the samba share:
ls: '53x53_A?istýjrancejevonku.jpg': No such file or directory
total 48
-rwxr--r-- 1 root root 2082 Nov 20 23:49 53x53_A?istýjrancejevonku.jpg
The share is mounted with unix/posix extensions, but needs vers=1.0 option in Debian 11 as otherwise it says unix extensions are not available on the server via SMB 3.1.1.
grep cifs /proc/mounts
//xxx.your-storagebox.de/backup /backups/xxx cifs rw,relatime,vers=1.0,cache=strict,username=xxx,uid=0,forceuid,gid=0,forcegid,addr=2a01:xxxx,soft,unix,posixpaths,serverino,mapposix,acl,noperm,rsize=1048576,wsize=65536,bsize=1048576,echo_interval=60,actimeo=1 0 0
Filenames with utf8 chars are working normally when copied to this share, just files with non-utf8 chars are problematic. Is there any mount option which can allow me to copy/backup these files? Or rdiff-backup option, which would workaround it (I guess not as the copy operation itself succeeds)?
I have a filesystem
What's its type?iocharset
mount option that is available in some "not-no-native" filesystem types. I wonder what kind of "state" the filename is in the filesystem. (Perhaps with certain locale it could show "properly"?) Btw, I don't suppose you can access the file on the ext4 with the name single-quoted in shell (or having a backslash before the?
)??
char, but with shell autocomplete I can access the file. Alsofind
can access the file. On the samba share,find
will just show error that the filename does not exist (hmm maybe samba returns different string for "readdir" and for "stat" of the actual filename).