/[BackupPC]/trunk/bin/BackupPC_recover_from_increments
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/bin/BackupPC_recover_from_increments

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 346 by dpavlin, Tue Mar 7 14:03:09 2006 UTC revision 347 by dpavlin, Tue Mar 7 14:03:12 2006 UTC
# Line 85  warn "written config:\n$conf_restore\n"; Line 85  warn "written config:\n$conf_restore\n";
85  sub restore_increment {  sub restore_increment {
86          my $path = shift || die "need path!";          my $path = shift || die "need path!";
87    
88            if ($path !~ m/\.tar\.gz$/i) {
89                    print "skipping $path, not .tar.gz increment\n";
90                    return;
91            }
92    
93          print "working on $path\n";          print "working on $path\n";
94    
95          if (-e $restore_path) {          if (-e $restore_path) {
# Line 137  foreach my $restore_inc (@ARGV) { Line 142  foreach my $restore_inc (@ARGV) {
142                          restore_increment( $File::Find::name );                          restore_increment( $File::Find::name );
143                  }, follow => 0 }, $restore_inc);                  }, follow => 0 }, $restore_inc);
144    
145          } elsif (-f $restore_inc && $restore_inc =~ m/\.tar\.gz$/i) {          } elsif (-f $restore_inc) {
146                  restore_increment( $restore_inc );                  restore_increment( $restore_inc );
147          } else {          } else {
148                  warn "skipped: $restore_inc, not directory or .tar.gz increment\n";                  warn "skipped: $restore_inc, not file or directory\n";
149          }          }
150    
151  }  }

Legend:
Removed from v.346  
changed lines
  Added in v.347

  ViewVC Help
Powered by ViewVC 1.1.26