In rsync, --log-file creates a log file, however, if i do a daily backup, the log is appended to the previous log file. How can i force rsync to overwrite the log file instead of appending to it?
The answer is that you cannot (unless you compile your own
rsync always appends to the log file. So as suggested in the comments you should delete the log before running
rsync. A simple example of removing the log and then running
rm rsync.log; rsync [OPTION...] SRC... [DEST]
These might also be helpful: