Mailinglist Archive: opensuse (1606 mails)

< Previous Next >
Re: [opensuse] strange samba rsync problem gets worse

----- Original Message -----
From: "Damon Register" <damonregister@xxxxxxxxxxxxx>
To: <opensuse@xxxxxxxxxxxx>
Sent: Saturday, September 06, 2008 9:11 AM
Subject: Re: [opensuse] strange samba rsync problem gets worse

Brian K. White wrote:
"man rsync", under --iconv=CONVERT_SPEC

says nothing will happen unless there is a charset option in the daemon
config file
I put "charset = cp437" into /etc/rsyncd.conf on a remote machine and
restarted rsyncd.
Do you have to restart? I thought I read somewhere that it reads
the config everytime it runs

I'm running a standalone rsyncd. It only runs once.
Running rsync via rsh or ssh is different. (or inetd/xinetd)

and it says to use --iconv=local_charset[,remote_charset]
Now I am really confused. I am looking at the rsync man page right now
I don't find what you said about the charset requirement. Am I missing

Rsync can convert filenames between character sets using this option. Using a
CONVERT_SPEC of "." tells rsync to look up the default character-set via the
locale setting. Alternately, you can fully specify what conversion to do by
giving a local and a remote charset separated by a comma in the order
--iconv=LOCAL,REMOTE, e.g. --iconv=utf8,iso88591. This order ensures that the
option will stay the same whether you're pushing or pulling files. Finally, you
can specify either --no-iconv or a CONVERT_SPEC of "-" to turn off any
conversion. The default setting of this option is site-specific, and can also
be affected via the RSYNC_ICONV environment variable.
For a list of what charset names your local iconv library supports, you can run
"iconv --list".


When you pass an --iconv option to an rsync daemon that allows it, the daemon
uses the charset specified in its "charset" configuration parameter regardless
of the remote charset you actually pass. Thus, you may feel free to specify
just the local charset for a daemon transfer (e.g. --iconv=utf8).

It looks like my previous example had a part that had no effect. According to
the man-page, the remote charset part of the --iconv=local,remote has no effect
ever when talking to a daemon, it -only- uses the charset option. That must be
why it also doesn't work at all if there is no charset option.

When NOT using the daemon, going to the same machine, which now has no charset
in it's config any more btw:
Notice the single ":" this time and different paths...

Without conversion:

bkw@nj2:~> rsync -avz --del nc7:i .
bkw@nc7's password:
receiving incremental file list

sent 34 bytes received 106 bytes 31.11 bytes/sec
total size is 0 speedup is 0.00

With conversion:

bkw@nj2:~> rsync -avz --del --iconv cp437,iso8859-1 nc7:i .
bkw@nc7's password:
receiving incremental file list
deleting i/h?llo

sent 31 bytes received 104 bytes 24.55 bytes/sec
total size is 0 speedup is 0.00

These both used ssh, which means "i" is a directory in bkw's home directory on

The rsyncd.conf file on nc7 has no charset option anywhere, but these transfers
did not use the daemon that read that config file so it doesn't matter. However
I would not do most transpers this way unless they are small and you can afford
the cpu on the encryption and don't care that they will transfer -much- slower
than native rsync.

Mucking around with this is dangerous too... I almost deleted my entire home
directory when iconv didn't like the characters and the charsets specified.

bkw@nj2:~> rsync -avz --del --iconv=iso8859-1,cp437 -n nc7:i .
bkw@nc7's password:
receiving incremental file list
[receiver] cannot convert filename: i/h??llo (Invalid or incomplete multibyte
or wide character)
IO error encountered -- skipping file deletion
deleting ./public_html/jra/sig.pcx
deleting ./public_html/jra/sig.pcl
deleting ./public_html/jra/sig-u.pcx
deleting ./public_html/jra/sig-u.pcl
deleting ./.dvipsrc
deleting ./.bashrc
deleting ./.bash_history

sent 15 bytes received 71 bytes 19.11 bytes/sec
total size is 0 speedup is 0.00 (DRY RUN)
rsync error: some files could not be transferred (code 23) at main.c(1538)

Brian K. White brian@xxxxxxxxx
filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups