projects
/
BackupPC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pre-seed with on disk backups
[BackupPC.git]
/
bin
/
BackupPC_dump
diff --git
a/bin/BackupPC_dump
b/bin/BackupPC_dump
index
d1e8384
..
cc633f9
100755
(executable)
--- a/
bin/BackupPC_dump
+++ b/
bin/BackupPC_dump
@@
-77,7
+77,7
@@
#
#========================================================================
#
#
#========================================================================
#
-# Version 3.2.0
beta0, released 5 April 2009
.
+# Version 3.2.0
, released 31 Jul 2010
.
#
# See http://backuppc.sourceforge.net.
#
#
# See http://backuppc.sourceforge.net.
#
@@
-327,6
+327,7
@@
if ( !$opts{i} && !$opts{f} && $Conf{BlackoutGoodCnt} >= 0
|| !defined($p->{hourBegin})
|| !defined($p->{hourEnd})
);
|| !defined($p->{hourBegin})
|| !defined($p->{hourEnd})
);
+ my $matchWday = $wday;
if ( $p->{hourBegin} > $p->{hourEnd} ) {
$blackout = $p->{hourBegin} <= $currHours
|| $currHours <= $p->{hourEnd};
if ( $p->{hourBegin} > $p->{hourEnd} ) {
$blackout = $p->{hourBegin} <= $currHours
|| $currHours <= $p->{hourEnd};
@@
-336,14
+337,14
@@
if ( !$opts{i} && !$opts{f} && $Conf{BlackoutGoodCnt} >= 0
# weekday check (eg: Monday 11pm-1am means Monday 2300 to
# Tuesday 0100, not Monday 2300-2400 plus Monday 0000-0100).
#
# weekday check (eg: Monday 11pm-1am means Monday 2300 to
# Tuesday 0100, not Monday 2300-2400 plus Monday 0000-0100).
#
- $
w
day--;
- $
wday += 7 if ( $w
day < 0 );
+ $
matchW
day--;
+ $
matchWday += 7 if ( $matchW
day < 0 );
}
} else {
$blackout = $p->{hourBegin} <= $currHours
&& $currHours <= $p->{hourEnd};
}
}
} else {
$blackout = $p->{hourBegin} <= $currHours
&& $currHours <= $p->{hourEnd};
}
- if ( $blackout && grep($_ == $
w
day, @{$p->{weekDays}}) ) {
+ if ( $blackout && grep($_ == $
matchW
day, @{$p->{weekDays}}) ) {
# print(LOG $bpc->timeStamp, "skipping because of blackout"
# . " (alive $StatusHost{aliveCnt} times)\n");
print(STDERR "Skipping $client because of blackout\n")
# print(LOG $bpc->timeStamp, "skipping because of blackout"
# . " (alive $StatusHost{aliveCnt} times)\n");
print(STDERR "Skipping $client because of blackout\n")
@@
-622,6
+623,7
@@
$NeedPostCmd = 1;
#
# Now backup each of the shares
#
#
# Now backup each of the shares
#
+my $shareDuplicate = {};
for my $shareName ( @$ShareNames ) {
local(*RH, *WH);
for my $shareName ( @$ShareNames ) {
local(*RH, *WH);
@@
-631,11
+633,17
@@
for my $shareName ( @$ShareNames ) {
$shareName = encode("utf8", $shareName);
$stat{xferOK} = $stat{hostAbort} = undef;
$stat{hostError} = $stat{lastOutputLine} = undef;
$shareName = encode("utf8", $shareName);
$stat{xferOK} = $stat{hostAbort} = undef;
$stat{hostError} = $stat{lastOutputLine} = undef;
- if ( -d "$Dir/new/$shareName" ) {
+ if ( $shareName eq "" ) {
+ print(LOG $bpc->timeStamp,
+ "unexpected empty share name skipped\n");
+ next;
+ }
+ if ( $shareDuplicate->{$shareName} ) {
print(LOG $bpc->timeStamp,
"unexpected repeated share name $shareName skipped\n");
next;
}
print(LOG $bpc->timeStamp,
"unexpected repeated share name $shareName skipped\n");
next;
}
+ $shareDuplicate->{$shareName} = 1;
UserCommandRun("DumpPreShareCmd", $shareName);
if ( $? && $Conf{UserCmdCheckStatus} ) {
UserCommandRun("DumpPreShareCmd", $shareName);
if ( $? && $Conf{UserCmdCheckStatus} ) {
@@
-914,6
+922,10
@@
for my $shareName ( @$ShareNames ) {
#
last;
}
#
last;
}
+ #
+ # Wait for any child processes to exit
+ #
+ # 1 while ( wait() >= 0 );
}
#
}
#
@@
-1005,6
+1017,8
@@
print(LOG $bpc->timeStamp,
BackupExpire($client);
BackupExpire($client);
+UserCommandRun("DumpPostFinishCmd"); # XXX ASA search integration
+
print("$type backup complete\n");
###########################################################################
print("$type backup complete\n");
###########################################################################