Tom Freeman wrote:
Hi folks,
I am running rsync via a perl script run in a cronjob.

my $message = `/usr/bin/rsync --rsh=/usr/local/openssh/bin/ssh -avu
$directory $destination`;

I want to be able to write this data
to a log file, so that if things don't work, I can find out what's wrong.

Is this a perl type question rather
than something I can do with rsync...?

You can do it by shell:


`/usr/bin/rsync --youroptions $directory $destination 2&>1 > $yourlogfile`

This logs stdout and stderr to your log file
If you don't like stderr in your output, leave out '2&>1'. If you only like to have stderr, add '2&> $yourlogfile' instead of the rest.


Patrick
--
Engineers motto: cheap, good,fast - choose any two
Patrick Strasser <past at sbox dot tugraz dot at>

--
To unsubscribe or change options: http://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.tuxedo.org/~esr/faqs/smart-questions.html

Reply via email to