aboutsummaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorAntoine Beaupré <anarcat@koumbit.org>2015-04-22 17:52:27 -0400
committerAntoine Beaupré <anarcat@koumbit.org>2015-04-22 17:58:51 -0400
commit873eb70ef87abfeaace2f4b0020626d01ad1bfe5 (patch)
treefbe7f9b009bb3726a552ad1bd6ce845593e01618 /files
parentd64db527aafa4a4edc32571d1729c9118c9c7c03 (diff)
downloadpuppet-backupninja-873eb70ef87abfeaace2f4b0020626d01ad1bfe5.tar.gz
puppet-backupninja-873eb70ef87abfeaace2f4b0020626d01ad1bfe5.tar.bz2
fix non-rdiff backup checks
Diffstat (limited to 'files')
-rwxr-xr-xfiles/checkbackups.pl13
1 files changed, 5 insertions, 8 deletions
diff --git a/files/checkbackups.pl b/files/checkbackups.pl
index 50a985c..3991446 100755
--- a/files/checkbackups.pl
+++ b/files/checkbackups.pl
@@ -164,16 +164,13 @@ foreach $host (@hosts) {
if (-d $dir) {
# guess the backup type and find a proper stamp file to compare
@rdiffs = glob("$dir/*/rdiff-backup-data");
- foreach $dir (@rdiffs) {
- $opt_v && print STDERR "inspecting dir $dir\n";
- $dir =~ s/rdiff-backup-data$//;
- check_rdiff($host, $dir, $opt_v);
+ foreach $subdir (@rdiffs) {
+ $subdir =~ s/rdiff-backup-data$//;
+ $opt_v && print STDERR "inspecting dir $subdir\n";
+ check_rdiff($host, $subdir, $opt_v);
$flag = 1;
}
- if (-d "$dir/rdiff-backup") {
- check_rdiff($host, $dir . '/rdiff-backup', $opt_v);
- $flag = 1;
- } elsif (-d "$dir/dump") {
+ if (-d "$dir/dump") {
# XXX: this doesn't check backup consistency
$flag="$dir/dump/" . `ls -tr $dir/dump | tail -1`;
chomp($flag);