Hi,
You can use in per-pc config.pl, the parameter
$Conf{DumpPostUserCmd} = '/usr/local/BackupPC/bin/BackupNotify $user $xferOK
$host $type $client $hostIP ';
the script BackupNotify is something like that :
#!/usr/bin/perl
#################
#
# $user $xferOK $host $type
#
$mailprog = '/usr/lib/sendmail';
$user = $ARGV[0];
$xferOK = $ARGV[1];
$host = $ARGV[2];
$type = $ARGV[3];
$client = $ARGV[4];
$hostIP = $ARGV[5];
$recipient = $user;
$msg = "Rapport de sauvegarde de BackupPC pour le PC \"$client ($host)\" :
\n\n";
if ( $xferOK) {
$msg .= "Le backup ($type) s'est bien deroule\n";
$subject = "Backup de $client : OK !";
&sendmail($msg);
} else {
$msg .= "Le backup ($type) a pose probleme ! \n";
$subject = "Probleme de backup de $client...";
}
#$msg .= "$user, $xferOK, $host, $type ";
sub sendmail {
my($msg) = @_;
open(MAIL, "|$mailprog -t") && do {
print MAIL "To: $recipient\n";
print MAIL "From: [EMAIL PROTECTED]";
# print MAIL "Cc:\n";
# print MAIL "Bcc:\n";
print MAIL "Subject: $subject \n\n";
print MAIL "$msg\n";
print MAIL "\nVisiter regulierement le site
<http://backuppc.xxxx.xxxx.xxx.be>\n";
print MAIL "\nContact support : mailto:[EMAIL PROTECTED]";
close (MAIL);
};
}
Francisco Daniel Igual Peña wrote:
>
> Hi,
>
> Is it possible that Backuppc sends weekly (or daily, dont mind) reports to a
> specific email even though there are no errors with the backups?. I want
> something like that, but I dont know how to do it.
>
> Thanks very much.
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> BackupPC-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/backuppc-users
> http://backuppc.sourceforge.net/
>
>
--
--------------------------------------------
Jean-Michel Beuken
Informaticien departemental (MAPR/FSA/SISE)
Universite catholique de Louvain-La-Neuve
Lab. PCPM/FSA, Bat. BOLTZMANN
1,Place Croix du Sud
1348 Louvain-La-Neuve BELGIUM
--------------------------------------------
Tel : (3210) 473570 Fax : (3210) 473452
HTTP://www.mapr.ucl.ac.be/~beuken
--------------------------------------------
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
BackupPC-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/