Re: [BackupPC-users] Parity (par2) command running on archives even though set to 0
2012-03-20 17:39:06
Les Mikesell <lesmikesell AT gmail DOT com> wrote on 03/20/2012
11:01:56 AM:
> The places where it works, it should be doing a
> alarm($conf->{ClientTimeout})
> to set/advance the timer. But you need to find the places where
it
> doesn't do this...
Well, here's the relevant code from BackupPC_archiveHost
that runs the tar as well as the parity. The commands are simply
executed and the script waits for them to complete. If the tar itself
were to take more than 1200 minutes it too would be killed by BackupPC,
even if it were running properly. There's no alarm(0) (which resets
the timer) anywhere in this process.
#
# Run the command
#
my $ret = system(@shell, $cmd);
if ( $ret ) {
print("Executing: @shell $cmd\n");
print("Error: $tarCreate, compress
or split failed\n");
exit(1);
}
#
# Run optional parity file generation (only if the
output is a directory,
# ie: not a tape device).
#
if ( -d $outLoc && -x $parPath ) {
if ( length($parfile) ) {
print("Running $parPath
to create parity files\n");
my $parCmd = "$parPath
c -r$parfile $outLocE/$host.$bkupNum.tar$fileExt.par2 $outLocE/$host.$bkupNum.tar$fileExt*";
$ret = system($parCmd);
if ( $ret ) {
print("Executing:
$parCmd\n");
print("Error:
$parPath failed\n");
exit(1);
}
}
}
I could put an "alarm(0);" between the tar
and the parity, but that won't help *that* much. The tar might take
200 minute to generate, and I'd like the parity to complete if even itself
needs more than 1200 minutes to complete by itself, as long as it's still
logging output.
One thought would be to fork the parity (and tar)
command and open the output of the command from the parent, and let the
parent both add the output to the log file as well as update the alarm.
I have some tiny experience with this (mainly boiler-plate code).
Would such a change be at least theoretically acceptable to being
included as a patch? I don't want to make such a change without it
being possibly included upstream: I don't like the idea of depending
on it in the future without that.
Thoughts?
Tim Massey
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure _______________________________________________
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/
|
|
|