LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   rsync behaves differently under cron and under my normal environment (http://www.linuxquestions.org/questions/linux-software-2/rsync-behaves-differently-under-cron-and-under-my-normal-environment-795780/)

jjge 03-16-2010 08:47 AM

rsync behaves differently under cron and under my normal environment
 
Hello, *

I am making a backup on an ntfs disk, mounted with:

# mount -t ntfs-3g \
-o utf8,quiet,shortname=winnt /dev/disk/by-label/Elements /mnt/tmp

using the following command:
*/usr/local/bin/rsync -rltDh --no-group --no-owner --delete *--modify-window=1 -stats */museum/ /mnt/tmp/backup/museum

Running this (or rather the shell script containing it) from the command line is OK, but if I run it as a cron job, I get thousands of messages:

rsync: recv_generator: failed to stat "/mnt/tmp/backup/museum/mail/ingridmens/mail/inbox.sbd/kerkstraa
t.sbd/offic\#303\#253le stukken": Invalid or incomplete multibyte or wide character (84)

(without line breaks, actually).

These files are all ordinary files made under Windows; the above should read "officiŽle stukken", and from the command line it does, but not in cron.

I guess I need to set an environment variable, but which one?

tredegar 03-16-2010 08:55 AM

Quote:

I guess I need to set an environment variable, but which one?
Maybe your $LANG because you are mounting with utf8?
Mine: LANG=en_GB.UTF-8


All times are GMT -5. The time now is 01:50 AM.