HI
what i need to be able to do is add a email to the end of a rsync. my current ion configures writes a daily log to disk, but real want to send the log to a central email address.
The current script is as below, is this possible?
#!/bin/bash
if [ -e /datalvm/.synclock ]
then
rsync -aWv --stats progress --delete --ignore-errors /datalvm/UK_REGIONAL_PRESS/PUB/NORTHCLIFFE/ 192.168.40.240:/datalvm/UK_REGIONAL_PRESS/PUB/NORTHCLIFFE/ >> /datalvm/rsy
nc_logs/northcliffe_rsync_failover.`date +%w`.log 2>&1
else
echo "lock file not present. Exiting" >> /datalvm/rsync_logs/northcliffe_rsync_failover.`date +%w`.log 2>&1
fi
Hi Praveen
just realised that some of these logs are very big, is there a way of send just a confirmation by email that the sync has completed and leaving the logs locally?
thanks
Treds