Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using the --log-file option in rsync to see the logs. But when I tried to run, it says:

 --log-file unrecognized option

Here is my command:

#/usr/bin/rsync -av -u --log-file="/sreeni/log.txt" --rsync-path=/usr/local/bin/rsync /sreeni nnmhpt20.ind.hp.com:/sreeni

could some one help me with the right syntax ?

I tried these options also.

#/usr/bin/rsync -av -u --log-file /sreeni/log.txt --rsync-path=/usr/local/bin/rsync /sreeni nnmhpt20.ind.hp.com:/sreeni

and

#/usr/bin/rsync -av -u --log-file="/sreeni/log.txt" --rsync-path=/usr/local/bin/rsync /sreeni nnmhpt20.ind.hp.com:/sreeni
share|improve this question

migrated from stackoverflow.com Nov 12 '11 at 13:11

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

Which is your distro? For an agnostic distro aproach you can use simple output redirection.

rsync your_chosen_options >> chosen_logfile 2>&1

which turns into,

/usr/bin/rsync -av -u /sreeni nnmhpt20.ind.hp.com:/sreeni >> /sreeni/log.txt 2>&1

Anyways for Debian based boxes, this seems to work,

rsync -av -u --log-file=/var/log/atest.log SRC DEST 2>&1 1>/dev/null

whereas for RHEL I needed,

rsync -av -u SRC DEST 1>>/var/log/atest.log 2>/dev/null
share|improve this answer
add comment

this expression works for me (ubuntu 12.10):

sudo rsync -axzuvh --force --delete --no-whole-file --log-file=/var/log/atest.log SRC DEST

remember using sudo.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.