X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Famvault.pl;fp=server-src%2Famvault.pl;h=de47562eec2ca23b6cd58e42f6d5ac52773c348a;hb=d28952249e392eb31bc8eecc53f6c477f30c617b;hp=88111f7c9728b3324ce4e4d9911f450c235fd474;hpb=949b8910a5e23c4285d0b1aedacfc82a14dc97a5;p=debian%2Famanda diff --git a/server-src/amvault.pl b/server-src/amvault.pl index 88111f7..de47562 100644 --- a/server-src/amvault.pl +++ b/server-src/amvault.pl @@ -1,9 +1,10 @@ #! @PERL@ # Copyright (c) 2008-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 @@ -440,7 +441,7 @@ sub scribe_started { my $xfers_finished = sub { my ($err) = @_; - $self->failure($err) if $err; + return $self->failure($err) if $err; $self->quit(0); }; @@ -938,6 +939,7 @@ sub usage { Usage: amvault [-o configoption...] [-q] [--quiet] [-n] [--dry-run] [--fulls-only] [--export] [--src-timestamp src-timestamp] + [--exact-match] --label-template label-template --dst-changer dst-changer [--autolabel autolabel-arg...] config @@ -973,6 +975,7 @@ my @config_overrides_opts; my $opt_quiet = 0; my $opt_dry_run = 0; my $opt_fulls_only = 0; +my $opt_exact_match = 0; my $opt_export = 0; my $opt_autolabel = {}; my $opt_autolabel_seen = 0; @@ -1016,6 +1019,7 @@ GetOptions( 'q|quiet' => \$opt_quiet, 'n|dry-run' => \$opt_dry_run, 'fulls-only' => \$opt_fulls_only, + 'exact-match' => \$opt_exact_match, 'export' => \$opt_export, 'label-template=s' => \&set_label_template, 'autolabel=s' => \&add_autolabel, @@ -1029,7 +1033,9 @@ $opt_autolabel->{'empty'} = 1 unless $opt_autolabel_seen; usage("not enough arguments") unless (@ARGV >= 1); my $config_name = shift @ARGV; -my @opt_dumpspecs = parse_dumpspecs(\@ARGV, $CMDLINE_PARSE_DATESTAMP|$CMDLINE_PARSE_LEVEL) +my $cmd_flags = $CMDLINE_PARSE_DATESTAMP|$CMDLINE_PARSE_LEVEL; +$cmd_flags |= $CMDLINE_EXACT_MATCH if $opt_exact_match; +my @opt_dumpspecs = parse_dumpspecs(\@ARGV, $cmd_flags) if (@ARGV); usage("no --label-template given") unless $opt_autolabel->{'template'};