From 1911cfc2645db632239c3e25092ebd59dc2f4a4b Mon Sep 17 00:00:00 2001 From: Heuzef Date: Thu, 19 Sep 2019 14:50:15 +0200 Subject: [PATCH] Revert --- check_size_consistency.pl | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/check_size_consistency.pl b/check_size_consistency.pl index ec9c4a9..ddc32c4 100644 --- a/check_size_consistency.pl +++ b/check_size_consistency.pl @@ -11,10 +11,9 @@ my (undef,undef,$bkpuid,$bkpgid) = getpwnam('backuppc'); setuid($bkpuid) if ($uid ne $bkpuid); setgid($bkpgid) if ($gid ne $bkpgid); -# Precise the host to check +# Precise host my $host = $ARGV[0]; -# Get values my $bpc = BackupPC::Lib->new(); my @backups = $bpc->BackupInfoRead($host); my $mainConf = $bpc->ConfigDataRead(); @@ -30,9 +29,7 @@ for ( my $i = 0 ; $i < @backups ; $i++ ) { $fullCnt++; if ( $fullAge < 0 || $backups[$i]{startTime} > $fullAge ) { $fullAge = $backups[$i]{startTime}; - $fullSize0 = $backups[$i]{size}; - $fullSize1 = $backups[$i]{size}; - $fullSize2 = $backups[$i]{size}; + $fullSize = $backups[$i]{size}; $fullDur = $backups[$i]{endTime} - $backups[$i]{startTime}; } } @@ -59,14 +56,10 @@ else { $lastXferErrors = $backups[@backups-1]{xferErrs} if ( @backups ); $maxErrors = $conf->{MaxXferError} if (defined $conf->{MaxXferError}); -# Print results print<<"EOF"; Usage: $0 -Full Size of last backup (0) : $fullSize0 -Full Size of last -1 : $fullSize1 -Full Size of last -2 : $fullSize2 - +Full Size of last backup : $fullSize EOF exit(0);