Hi all,

I had an rsync Full that aborted ("unexpected repeated share"?) and it's 
state was ended with "Saved partial dump 0". In order to catch-it-up I 
requested an Incremental ... though BackupPC applied another patch Full 
covertly to do the job. The incrmental I asked for was not run. End 
result is a successfully backed up host with a Level 0 formed from two 
goes at Full backup.

What I am really flagging here though is that the DumpPostShareCmd phase 
does not appear to run on 'catch-ups'. My mailer that runs after each 
job that (succeeds and failure) only seems to run once across a level 
backup attempt(s) where it flagged the initial failure but not the 
success of the catch-up. The success status of the catch-up that 
rectified the previous abortion/failure was not transmitted through the 
User Command mailer I had set. Basically my User Command (mailer) is this:

#!/usr/bin/perl

(
$type,   #backup, archive, restore
$xferOK, # 0, 1
$client,
$host,
$hostIP,
$user,
$moreUsers,
$share,
$shares,
$XferMethod,
$sshPath,
$cmdType
) = @ARGV;

if ( $xferOK ) {
   $xferOK = "SUCCESS";
} else {
   $xferOK = "ERRORS";
}

$dumper = join( "\n", @ARGV );

$subject = "[$xferOK] BackupPC $client ... $share";

@body = <<EOD;
Dear $user,

The $type operation requested of $share on $client by $moreUsers has a 
status of $xferOK.

** Debug start **
$dumper

Remote user: $ENV{REMOTEUSER};
** Debug end **

Thank you,
BackupPC
EOD

$recipients = "[EMAIL PROTECTED]";

$cmd = "mail -s \"$subject\" \"$recipients\"";
open($fh, '|-', $cmd) or
    die "Could not open $cmd: $!";

print $fh @body;

close($fh) or
    die "Could not close $cmd: $!";


** on a side-note you may have noticed a previous posting of mine 
referring to how I could get the current http REMOTEUSER initiating a 
manual backup as a substitution. The script above is exactly where I 
want this substitution. I assume REMOTEHOST is only set for intereactive 
backups and not for scheduleds so mailing differently depending on 
whether it was manual or scheduled shouldn't be an issue ... as long as 
REMOTEUSER is a supported substitution that is.)

(Sorry for cross-ref'ing my postings retrospectively but perhaps the 
window on my previous submissions has aged out before anyone got a 
chance to follow up. I have not received any response to the REMOTEUSER 
substitution requirement.)

Thanks

-- Mark

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
BackupPC-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Reply via email to