BackupPC-users

[BackupPC-users] Problem, Backuppc is not executing a defined command before running a backup

2009-02-22 17:41:46
Subject: [BackupPC-users] Problem, Backuppc is not executing a defined command before running a backup
From: "James Beam" <jbeam AT jbnetworks DOT org>
To: backuppc-users AT lists.sourceforge DOT net
Date: Sun, 22 Feb 2009 21:39:57 +0000
I wanted to be able to notify a group of people when any backup starts or ends, so I did some googling and found an archived email on this list about how I might do it.
 
I made a script with the following contents as a test and named it startbkpemail.sh (just used the example name from the post) and added the a line '/usr/local/bin/startbkpemail.sh $host $type';  in the DumpPreUserCmd field in the host config - but it is not executing it. Any suggestions? The permissions on the file are 777 for testing so I know that is not the problem.
 
#!/bin/sh
#
SUBJECT="Backup for Production Server: $1 has started."
TO="james.beam AT pinnacle1 DOT com"
MESSAGE="/tmp/message.txt"
 
echo "Server Name: $1" >> $MESSAGE
echo "Backup Type: $2" >> $MESSAGE
echo "" >> $MESSAGE
echo "Confirmation will be sent when backup completes." >> $MESSAGE
echo "" >> $MESSAGE
echo "THIS IS AN AUTOMATED EMAIL" >> $MESSAGE
 

/bin/mail -s "$SUBJECT" "$TO" < $MESSAGE
echo "done" >> /tmp/test.txt
rm $MESSAGE

 
 
James Beam
Networking is more than just cables and connectoins...
 

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/