Welcome! » Log In » Create A New Profile

When is XferLOG.XXX.z created?

Posted by Anonymous 
When is XferLOG.XXX.z created?
February 26, 2008 04:13AM

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...

Sorry, only registered users may post in this forum.

Click here to login