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've got a successful rsync local backup using:

rsync -vart --del /mnt/main/main /mnt/backup --log-file=/var/log/rsync_mainBackup.log

Can anyone tell me how the success/failure of the operation can be emailed to me? Or even the .log file?

share|improve this question

1 Answer 1

you can check the return value of the rsync process and you can test for the existence of a maillog.

You can use the mail(1) command to send mail from the shell.

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.