this can be killall par2 or similar command or par dying on us
"%c %o",
[ 'host|h=s@', "import just host(s)" ],
[ 'num|n=s@', "import just backup number(s)" ],
"%c %o",
[ 'host|h=s@', "import just host(s)" ],
[ 'num|n=s@', "import just backup number(s)" ],
+[ 'ok=n', "xferOK", { default => 0 } ],
[ 'check|c', "check archives on disk and sync", { default => 1 } ],
[ 'debug|d', "debug", { default => 1 } ],
[ 'help', "show help" ],
[ 'check|c', "check archives on disk and sync", { default => 1 } ],
[ 'debug|d', "debug", { default => 1 } ],
[ 'help', "show help" ],
my $host = $opt->host->[$_];
my $num = $opt->num->[$_];
my $host = $opt->host->[$_];
my $num = $opt->num->[$_];
- check_archive $host => $num;
+ if ( ! $opt->ok ) {
+ warn "ERROR $host $num running cleanup";
+ foreach my $path ( glob "$Conf{ArchiveDest}/$host.$num.*" ) {
+ warn "# rm $path";
+ unlink $path || die $!;
+ }
+ } else {
+ check_archive $host => $num;
+ }