Everyone,
I am trying to generate an automatic e-mail when a backup is completed
(successful or not).
I have modified the mailsend.sh script (posted elsewhere, I believe) to try to
send me the last 20 lines of the most recent file XferLOG.XXX.z (where XXX is
the backup number) or XferLOG.bad.z (if the backup failed).
The problem is that it seems the XferLOG.XXX.z file gets written in conjunction
with the mailsend.sh script being fired. So when I use the command:
backuplog=`ls -t /var/resource/backups/pc/$3/XferLOG.*.z | /usr/bin/head -1`
It gives me the last log file, not the most recent one.
I have added "sleep" commands to the script, etc, but it doesn't seem to
matter. I always get the "previous" log file echoed to me :-/
Does anyone have a solution/suggestion as to how to get the most recent XferLOG
from within the backup process?
Thanks in advance...
Brian
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
BackupPC-users mailing list
[email protected]
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/