Rsync with non-english characters in filenames?

Fredrik Karlsson dargosch at gmail.com
Mon Jun 18 10:00:00 GMT 2007


Hi,

I am trying to use rsync to migrate homefolders from one server to
another. For this I use:

> rsync --rsh="ssh -l root" -vaz beaucent.ling.umu.se:/export/home/ .

Which works fine until I get to some files where the user has,
unfortunatelly, used a non-ascii character in the file name:

--- snip --
...
test070503/u2/Library/Preferences/com.apple.quicktime.plugin.preferences.plist
test070503/u2/Library/Preferences/com.apple.recentitems.plist
test070503/u2/Library/Preferences/com.apple.scheduler.plist
test070503/u2/Library/Preferences/com.apple.sidebarlists.plist
test070503/u2/Library/Preferences/com.apple.systempreferences.plist
test070503/u2/Library/Preferences/com.apple.systemuiserver.plist
test070503/u2/Library/Preferences/com.apple.universalaccess.plist
test070503/u2/Library/Preferences/loginwindow.plist
test070503/u2/Library/Preferences/widget-com.apple.widget.weather.plist
rsync: recv_generator: mkdir
"/Volumes/Home_dirs/homes/students/kv04/kv04hen/inl?mningsuppgifter"
failed: Invalid argument (22)
rsync: stat "/Volumes/Home_dirs/homes/students/kv04/kv04hen/inl?mningsuppgifter"
failed: Invalid argument (22)
rsync: recv_generator: mkdir
"/Volumes/Home_dirs/homes/students/kv04/kv04jnn/PROJEKT/peer re p?
Grup A" failed: Invalid argument (22)
rsync: stat "/Volumes/Home_dirs/homes/students/kv04/kv04jnn/PROJEKT/peer
re p? Grup A" failed: Invalid argument (22)
rsync: recv_generator: mkdir
"/Volumes/Home_dirs/homes/students/kv04/kv04jnn/leilas forel?sningar"
failed: Invalid argument (22)
rsync: stat "/Volumes/Home_dirs/homes/students/kv04/kv04jnn/leilas
forel?sningar" failed: Invalid argument (22)
rsync: recv_generator: mkdir
"/Volumes/Home_dirs/homes/students/kv04/kv04tsg/.mozilla/liWTYFK?A"
failed: Invalid argument (22)
rsync: stat "/Volumes/Home_dirs/homes/students/kv04/kv04tsg/.mozilla/liWTYFK?A"
failed: Invalid argument (22)
rsync: recv_generator: mkdir
"/Volumes/Home_dirs/homes/students/kv04/kv04tsg/.mozilla/liWTYFK?A/0gg9yc70.slt"
failed: Invalid argument (22)
rsync: stat "/Volumes/Home_dirs/homes/students/kv04/kv04tsg/.mozilla/liWTYFK?A/0gg9yc70.slt"
failed: Invalid argument (22)
rsync: recv_generator: mkdir
"/Volumes/Home_dirs/homes/students/kv04/kv04tsg/.mozilla/liWTYFK?A/0gg9yc70.slt/chrome"
failed: Invalid argument (22)
rsync: stat "/Volumes/Home_dirs/homes/students/kv04/kv04tsg/.mozilla/liWTYFK?A/0gg9yc70.slt/chrome"
failed: Invalid argument (22)
rsync: recv_generator: mkdir
"/Volumes/Home_dirs/homes/students/kv04/kv04tsg/inl?mning" failed:
Invalid argument (22)
rsync: stat "/Volumes/Home_dirs/homes/students/kv04/kv04tsg/inl?mning"
failed: Invalid argument (22)
rsync: recv_generator: mkdir
"/Volumes/Home_dirs/homes/students/kv04/kv04uln/f?rdiga labbar"
failed: Invalid argument (22)
rsync: stat "/Volumes/Home_dirs/homes/students/kv04/kv04uln/f?rdiga
labbar" failed: Invalid argument (22)
rsync: recv_generator: mkdir
"/Volumes/Home_dirs/homes/students/log5/alaarn05/FoFoLog/uppl?st_tal"
failed: Invalid argument (22)
rsync: stat "/Volumes/Home_dirs/homes/students/log5/alaarn05/FoFoLog/uppl?st_tal"
failed: Invalid argument (22)
rsync: recv_generator: mkdir
"/Volumes/Home_dirs/homes/students/log5/alaarn05/FoFoLog/uppl?st_tal/engelska"
failed: Invalid argument (22)
rsync: stat "/Volumes/Home_dirs/homes/students/log5/alaarn05/FoFoLog/uppl?st_tal/engelska"
failed: Invalid argument (22)
rsync: recv_generator: mkdir
"/Volumes/Home_dirs/homes/students/log5/alaarn05/FoFoLog/uppl?st_tal/franska"
failed: Invalid argument (22)
rsync: stat "/Volumes/Home_dirs/homes/students/log5/alaarn05/FoFoLog/uppl?st_tal/franska"
failed: Invalid argument (22)
rsync: recv_generator: mkdir
"/Volumes/Home_dirs/homes/students/log5/alaarn05/FoFoLog/uppl?st_tal/portugisiska"
failed: Invalid argument (22)
rsync: stat "/Volumes/Home_dirs/homes/students/log5/alaarn05/FoFoLog/uppl?st_tal/portugisiska"
failed: Invalid argument (22)
rsync: recv_generator: mkdir
"/Volumes/Home_dirs/homes/students/log5/alaarn05/FoFoLog/uppl?st_tal/spanska"
failed: Invalid argument (22)
rsync: stat "/Volumes/Home_dirs/homes/students/log5/alaarn05/FoFoLog/uppl?st_tal/spanska"
failed: Invalid argument (22)
rsync: recv_generator: mkdir
"/Volumes/Home_dirs/homes/students/log5/alaarn05/FoFoLog/uppl?st_tal/svenska"
failed: Invalid argument (22)
rsync: stat "/Volumes/Home_dirs/homes/students/log5/alaarn05/FoFoLog/uppl?st_tal/svenska"
failed: Invalid argument (22)
rsync: recv_generator: mkdir
"/Volumes/Home_dirs/homes/students/log5/alaarn05/FoFoLog/uppl?st_tal/tyska"
failed: Invalid argument (22)
rsync: stat "/Volumes/Home_dirs/homes/students/log5/alaarn05/FoFoLog/uppl?st_tal/tyska"
failed: Invalid argument (22)
rsync: recv_generator: mkdir
"/Volumes/Home_dirs/homes/students/log5/alaarn05/sm?landskvinna"
failed: Invalid argument (22)
rsync: stat "/Volumes/Home_dirs/homes/students/log5/alaarn05/sm?landskvinna"
failed: Invalid argument (22)
rsync: recv_generator: mkdir
"/Volumes/Home_dirs/homes/students/log5/anahar05/FoFoLog/uppl?st_tal"
failed: Invalid argument (22)
rsync: stat "/Volumes/Home_dirs/homes/students/log5/anahar05/FoFoLog/uppl?st_tal"
failed: Invalid argument (22)
rsync: recv_generator: mkdir
"/Volumes/Home_dirs/homes/students/log5/anahar05/FoFoLog/uppl?st_tal/engelska"
failed: Invalid argument (22)
rsync: stat "/Volumes/Home_dirs/homes/students/log5/anahar05/FoFoLog/uppl?st_tal/engelska"
failed: Invalid argument (22)
....
<--- /snip ---->

Is there a way to protect these filenames?

/Fredrik

-- 
"Give up learning, and put an end to your troubles."


More information about the rsync mailing list