rdiff-backup-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[rdiff-backup-users] IOError: [Errno 2] trying to backup a Windows share


From: Armando M. Baratti
Subject: [rdiff-backup-users] IOError: [Errno 2] trying to backup a Windows share to a Linux machine
Date: Fri, 20 Jul 2007 19:55:56 -0300
User-agent: Thunderbird 2.0.0.0 (Windows/20070326)

Hello,

This is my first post in this list.
I'm trying to do a rdiff-backup form a windows share, mounted through Samba in a Linux machine, to the same machine.

The backup occurs without any problem besides some error log entries stating:
ListError path/to/file/filename_with_strange_?_char.ext [Errno 2] No such file or directory: '/mnt/mountpoint/
path/to/file/filename_with_strange_?_char.ext'
on some files.

These files have accented characters (we speak portuguese here in Brazil).
But not every accented filename yields this kind of error.
In general many accented filenames can be backed up correctly.
The ones that are in the error log appear in the mounting point with a '?' character when the same file are depicted with another character in a Windows machine. I think someone is creating them by copying and pasting directly from e-mail (and such grabbing some strangely codified character).

I've tried to list one directory with such files in a Python shell:
>>> os.listdir('path/to/the/file')
['one_file.ext', 'another_file
.ext', 'filename_with_strange_?_char.ext', 'yet_another_file.ext']

So here the character appears as a '?'.
Even:
>>>
chr(os.listdir('path/to/the/file')[2][22])
63
that is the ASCII code for a proper '?' character.

Then if I test if this a file:
>>> os.path.isfile(os.path.join('
path/to/the/file',os.listdir('path/to/the/file')[2]))
True

Python really think it's name have such '?' inside it.
But if I try to open it:

>>> fin = open(
os.path.join('path/to/the/file',os.listdir('path/to/the/file')[2]))
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
IOError: [Errno 2] No such file or directory: '
/path/to/the/file/filename_with_strange_?_char.ext'

As if it now recognizes it as not having a '?' inside it's name.
I don't have much experience with samba, but the mounting seems fine to me.
I think the problem is related to these different views from inside Python (isfile vs open) .

If I could detect this kind of filename (in a Python script) I could list them and ask people to correct the filename.
Maybe someone could help me on this (or even use this information to make rdiff-backup more capable to work with foreign languages).

I'm using Trustix 3.0.5 up to date.

The Windows share mounting command:
/sbin/mount.cifs //server/share
/mnt/mountpoint -o 'domain=DOMAIN,user=UserName,password=passwd,iocharset=iso8859-1,codepage=cp1252,uid=root,gid=root,file_mode=0644,dir_mode=0755'

Thank you,
--
Armando M. Baratti

LARC
  /Pesquisa de Marketing Ltda

reply via email to

[Prev in Thread] Current Thread [Next in Thread]