X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Famrestore.pl;fp=server-src%2Famrestore.pl;h=b9cde45d12add14f8ba59c86389d1ed5776fc6c3;hb=691567b16c13087b31ee4c2b6d038e57872fae82;hp=879aec434f1431460b8a2afe531d22e1eb764160;hpb=cc7d7b45afc706099acf7ff2490ec5667d370651;p=debian%2Famanda diff --git a/server-src/amrestore.pl b/server-src/amrestore.pl index 879aec4..b9cde45 100644 --- a/server-src/amrestore.pl +++ b/server-src/amrestore.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2009-2012 Zmanda, Inc. All Rights Reserved. # -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published -# by the Free Software Foundation. +# 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 the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -42,7 +43,7 @@ sub usage { print STDERR "$msg\n" if $msg; print STDERR < \&usage, 'config=s' => \$opt_config, 'holding' => \$opt_holding, + 'exact-match' => \$opt_exact_match, 'b=i' => \$opt_blocksize, 'r' => \$opt_raw, 'c' => \$opt_compress, @@ -87,8 +89,9 @@ if (!$opt_holding) { if (Amanda::Holding::get_header($opt_restore_src)); } -my @opt_dumpspecs = Amanda::Cmdline::parse_dumpspecs([@ARGV], - $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP); +my $cmd_flags = $Amanda::Cmdline::CMDLINE_PARSE_DATESTAMP; +$cmd_flags |= $Amanda::Cmdline::CMDLINE_EXACT_MATCH if $opt_exact_match; +my @opt_dumpspecs = Amanda::Cmdline::parse_dumpspecs([@ARGV], $cmd_flags); usage("Cannot check a label on a holding-disk file") if ($opt_holding and $opt_label);