SearchFAQMemberlist Log in
Reply to topic Page 1 of 1
When is XferLOG.XXX.z created?
Author Message
Post When is XferLOG.XXX.z created? 
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

Display posts from previous:
Reply to topic Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
  


Magic SEO URL for phpBB