projects
/
BackupPC.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5da6f2d
)
make check_archive transactionally safe
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 30 Jan 2011 16:47:25 +0000
(17:47 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Sun, 30 Jan 2011 16:47:25 +0000
(17:47 +0100)
bin/BackupPC_ASA_PostArchive_Update
patch
|
blob
|
history
diff --git
a/bin/BackupPC_ASA_PostArchive_Update
b/bin/BackupPC_ASA_PostArchive_Update
index
93478c9
..
e3d022d
100755
(executable)
--- a/
bin/BackupPC_ASA_PostArchive_Update
+++ b/
bin/BackupPC_ASA_PostArchive_Update
@@
-230,7
+230,6
@@
sub check_archive {
});
$sth_insert->execute($backup_id, $part_nr, $tar_size, $size, $md5, $items, $filename);
- $dbh->commit;
}
print " [parts: ",join(", ", @tar_parts),"]" if $opt->debug;
@@
-322,7
+321,6
@@
sub check_archive {
$part_nr,
get_backup_id($host, $num),
);
- $dbh->commit;
@tar_files = sort @tar_files;
print "\n\t",($#tar_files + 1), " tar files";
@@
-366,6
+364,8
@@
sub check_archive {
print " ",($same ? 'ok' : 'DIFFERENT'),
", dur: ",fmt_time(time() - $t), "\n";
+ $dbh->commit;
+
return $same;
}
@@
-446,8
+446,6
@@
while (my $row = $sth->fetchrow_hashref) {
print ", dur: ",fmt_time(time() - $t), "\n";
- $dbh->commit;
-
}
undef $sth;