projects
/
BackupPC.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- updated version to BackupPC-2.1.0beta0
[BackupPC.git]
/
bin
/
BackupPC_nightly
diff --git
a/bin/BackupPC_nightly
b/bin/BackupPC_nightly
index
7279536
..
5548738
100755
(executable)
--- a/
bin/BackupPC_nightly
+++ b/
bin/BackupPC_nightly
@@
-1,4
+1,4
@@
-#!/bin/perl
-T
+#!/bin/perl
#============================================================= -*-perl-*-
#
# BackupPC_nightly: Nightly cleanup & statistics script.
#============================================================= -*-perl-*-
#
# BackupPC_nightly: Nightly cleanup & statistics script.
@@
-17,7
+17,7
@@
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
# Craig Barratt <cbarratt@users.sourceforge.net>
#
# COPYRIGHT
-# Copyright (C) 2001 Craig Barratt
+# Copyright (C) 2001
-2003
Craig Barratt
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@
-35,14
+35,15
@@
#
#========================================================================
#
#
#========================================================================
#
-# Version
1.5.0, released 2 Aug 2002
.
+# Version
2.1.0beta0, released 20 Mar 2004
.
#
# See http://backuppc.sourceforge.net.
#
#========================================================================
use strict;
#
# See http://backuppc.sourceforge.net.
#
#========================================================================
use strict;
-use lib "__INSTALLDIR__/lib";
+no utf8;
+use lib "/usr/local/BackupPC/lib";
use BackupPC::Lib;
use BackupPC::FileZIO;
use BackupPC::Lib;
use BackupPC::FileZIO;
@@
-101,7
+102,7
@@
if ( $mday == 1 ) {
"$TopDir/pc/$host/LOG.0.z",
"$TopDir/pc/$host/LOG.0",
$Conf{CompressLevel}, 1);
"$TopDir/pc/$host/LOG.0.z",
"$TopDir/pc/$host/LOG.0",
$Conf{CompressLevel}, 1);
- open(LOG, ">$TopDir/pc/$host/LOG") && close(LOG);
+ open(LOG, ">
", "
$TopDir/pc/$host/LOG") && close(LOG);
}
}
}
}
@@
-120,6
+121,7
@@
my $fileCntRep; # total number of file names containing "_", ie: files
# that have repeated md5 checksums
my $fileRepMax; # worse case number of files that have repeated checksums
# (ie: max(nnn+1) for all names xxxxxxxxxxxxxxxx_nnn)
# that have repeated md5 checksums
my $fileRepMax; # worse case number of files that have repeated checksums
# (ie: max(nnn+1) for all names xxxxxxxxxxxxxxxx_nnn)
+my $fileLinkMax; # maximum number of hardlinks on a pool file
my $fileCntRename; # number of renamed files (to keep file numbering
# contiguous)
my %FixList; # list of paths that need to be renamed to avoid
my $fileCntRename; # number of renamed files (to keep file numbering
# contiguous)
my %FixList; # list of paths that need to be renamed to avoid
@@
-133,6
+135,7
@@
for my $pool ( qw(pool cpool) ) {
$blkCnt2 = 0;
$fileCntRep = 0;
$fileRepMax = 0;
$blkCnt2 = 0;
$fileCntRep = 0;
$fileRepMax = 0;
+ $fileLinkMax = 0;
$fileCntRename = 0;
%FixList = ();
find({wanted => \&GetPoolStats, no_chdir => 1}, "$TopDir/$pool");
$fileCntRename = 0;
%FixList = ();
find({wanted => \&GetPoolStats, no_chdir => 1}, "$TopDir/$pool");
@@
-168,7
+171,8
@@
for my $pool ( qw(pool cpool) ) {
}
}
print("BackupPC_stats = $pool,$fileCnt,$dirCnt,$kb,$kb2,$kbRm,$fileCntRm,"
}
}
print("BackupPC_stats = $pool,$fileCnt,$dirCnt,$kb,$kb2,$kbRm,$fileCntRm,"
- . "$fileCntRep,$fileRepMax,$fileCntRename\n");
+ . "$fileCntRep,$fileRepMax,$fileCntRename,"
+ . "$fileLinkMax\n");
}
###########################################################################
}
###########################################################################
@@
-218,5
+222,6
@@
sub GetPoolStats
$fileCnt += -f;
$blkCnt += $s[12];
$blkCnt2 += $s[12] if ( -f && $s[3] == 2 );
$fileCnt += -f;
$blkCnt += $s[12];
$blkCnt2 += $s[12] if ( -f && $s[3] == 2 );
+ $fileLinkMax = $s[3] if ( $fileLinkMax < $s[3] );
}
}
}
}