The previous patch broke something.
Try this new set2-r2.diff patch
Jean-Louis
On 10/11/17 10:40 AM, Austin S. Hemmelgarn wrote:
On 2017-11-10 08:27, Jean-Louis Martineau wrote:
On 10/11/17 07:57 AM, Austin S. Hemmelgarn wrote:
On 2017-11-08 08:03, Jean-Louis Martineau wrote:
On 07/11/17 02:58 PM, Austin S. Hemmelgarn wrote:
> On 2017-11-07 10:22, Jean-Louis Martineau wrote:
>> Austin,
>>
>> It's hard to say something with only the error message.
>>
>> Can you post the amdump.<datestamp> and log.<datestamp>.0 for
the 2
>> backup set that fail.
>>
> I've attached the files (I would put them inline, but one of the
sets
> has over 100 DLE's, so the amdump file is huge, and the others are
> still over 100k each, and I figured nobody want's to try and wad
> through those in-line).
>
> The set1 and set2 files are for the two backup sets that show the
> header mismatch error, and the set3 files are for the one that
claims
> failures in the dump summary.
I looked at set3, the error in the 'DUMP SUMMARY' are related to the
error in the 'FAILURE DUMP SUMMARY'
client2 /boot lev 0 FLUSH [File 0 not found]
client3 /boot lev 0 FLUSH [File 0 not found]
client7 /boot lev 0 FLUSH [File 0 not found]
client8 /boot lev 0 FLUSH [File 0 not found]
client0 /boot lev 0 FLUSH [File 0 not found]
client9 /boot lev 0 FLUSH [File 0 not found]
client9 /srv lev 0 FLUSH [File 0 not found]
client9 /var lev 0 FLUSH [File 0 not found]
server0 /boot lev 0 FLUSH [File 0 not found]
client10 /boot lev 0 FLUSH [File 0 not found]
client11 /boot lev 0 FLUSH [File 0 not found]
client12 /boot lev 0 FLUSH [File 0 not found]
They are VAULT attemp, not FLUSH, looking only at the first entry, it
try to vault 'client2 /boot 0 20171024084159' which it expect to
find on
tape Server-01. It is an older dump.
Do Server-01 is still there? Did it still contains the dump?
OK, I've done some further investigation by tweaking the labeling a
bit (which actually fixed a purely cosmetic issue we were having),
but I'm still seeing the same problem that prompted this thread, and
I can confirm that the dumps are where Amanda is trying to look for
them, it's just not seeing them for some reason. I hadn't thought
of this before, but could it have something to do with the virtual
tape library being auto-mounted over NFS on the backup server?
Austin,
Can you try to see if amfetchdump can restore it?
* amfetchdump CONFIG client2 /boot 20171024084159
amfetchdump doesn't see it, and neither does amrecover, but the files
for the given parts are definitely there (I know for a fact that the
dump in question has exactly one part, and the file for that does
exist on the virtual tape mentioned in the log file).
I'm probably not going to be able to check more on this today, but
I'll likely be checking if amrestore and amadmin find can see them.
This message is the property of CARBONITE, INC. and may contain confidential or
privileged information.
If this message has been delivered to you by mistake, then do not copy or
deliver this message to anyone. Instead, destroy it and notify me by reply
e-mail
diff --git a/perl/Amanda/DB/Catalog.pm b/perl/Amanda/DB/Catalog.pm
index 56f7d70..44d2242 100644
--- a/perl/Amanda/DB/Catalog.pm
+++ b/perl/Amanda/DB/Catalog.pm
@@ -468,7 +468,7 @@ sub get_latest_write_timestamp {
if (@timestamps) {
# if we're not looking for a particular type, then this is easy
- if (!exists $params{'types'}) {
+ if (!defined $params{'types'}) {
return $timestamps[-1];
}
@@ -524,20 +524,20 @@ sub get_parts_and_dumps {
# pre-process params by appending all of the "singular" parameters to the "plurals"
push @{$params{'write_timestamps'}}, map { zeropad($_) } $params{'write_timestamp'}
- if exists($params{'write_timestamp'});
+ if defined($params{'write_timestamp'});
push @{$params{'dump_timestamps'}}, map { zeropad($_) } $params{'dump_timestamp'}
- if exists($params{'dump_timestamp'});
+ if defined($params{'dump_timestamp'});
push @{$params{'hostnames'}}, $params{'hostname'}
- if exists($params{'hostname'});
+ if defined($params{'hostname'});
push @{$params{'disknames'}}, $params{'diskname'}
- if exists($params{'diskname'});
+ if defined($params{'diskname'});
push @{$params{'levels'}}, $params{'level'}
- if exists($params{'level'});
+ if defined($params{'level'});
push @{$params{'storages'}}, $params{'storage'}
if defined($params{'storage'});
if ($get_what eq 'parts') {
push @{$params{'labels'}}, $params{'label'}
- if exists($params{'label'});
+ if defined($params{'label'});
} else {
delete $params{'labels'};
}
@@ -562,7 +562,7 @@ sub get_parts_and_dumps {
my @logfiles;
if ($params{'holding'}) {
@logfiles = ( 'holding', );
- } elsif (exists($params{'write_timestamps'})) {
+ } elsif (defined($params{'write_timestamps'})) {
# if we have specific write_timestamps, the job is pretty easy.
my %timestamps_hash = map { ($_, undef) } @{$params{'write_timestamps'}};
for my $logfile (Amanda::Logfile::find_log()) {
@@ -570,7 +570,7 @@ sub get_parts_and_dumps {
next unless (exists($timestamps_hash{zeropad($timestamp)}));
push @logfiles, $logfile;
}
- } elsif (exists($params{'dump_timestamps'})) {
+ } elsif (defined($params{'dump_timestamps'})) {
# otherwise, we need only look in logfiles at or after the earliest dump timestamp
my @sorted_timestamps = sort @{$params{'dump_timestamps'}};
my $earliest_timestamp = $sorted_timestamps[0];
@@ -587,23 +587,23 @@ sub get_parts_and_dumps {
# Set up some hash tables for speedy lookups of various attributes
my (%dump_timestamps_hash, %hostnames_hash, %disknames_hash, %levels_hash, %storages_hash, %labels_hash);
%dump_timestamps_hash = map { ($_, undef) } @{$params{'dump_timestamps'}}
- if (exists($params{'dump_timestamps'}));
+ if (defined($params{'dump_timestamps'}));
%hostnames_hash = map { ($_, undef) } @{$params{'hostnames'}}
- if (exists($params{'hostnames'}));
+ if (defined($params{'hostnames'}));
%disknames_hash = map { ($_, undef) } @{$params{'disknames'}}
- if (exists($params{'disknames'}));
+ if (defined($params{'disknames'}));
%levels_hash = map { ($_, undef) } @{$params{'levels'}}
- if (exists($params{'levels'}));
+ if (defined($params{'levels'}));
%storages_hash = map { ($_, undef) } @{$params{'storages'}}
if (defined($params{'storages'}));
%labels_hash = map { ($_, undef) } @{$params{'labels'}}
- if (exists($params{'labels'}));
+ if (defined($params{'labels'}));
my %dumps;
my @parts;
# *also* scan holding if the holding param wasn't specified
- if (!exists $params{'holding'}) {
+ if (!defined $params{'holding'}) {
push @logfiles, 'holding';
}
@@ -628,9 +628,9 @@ sub get_parts_and_dumps {
# filter against *_match with dumps_match
@find_results = Amanda::Logfile::dumps_match([@find_results],
- exists($params{'hostname_match'})? $params{'hostname_match'} : undef,
- exists($params{'diskname_match'})? $params{'diskname_match'} : undef,
- exists($params{'dump_timestamp_match'})? $params{'dump_timestamp_match'} : undef,
+ defined($params{'hostname_match'})? $params{'hostname_match'} : undef,
+ defined($params{'diskname_match'})? $params{'diskname_match'} : undef,
+ defined($params{'dump_timestamp_match'})? $params{'dump_timestamp_match'} : undef,
undef,
0);
diff --git a/perl/Amanda/Recovery/Planner.pm b/perl/Amanda/Recovery/Planner.pm
index 7bf09c7..ecb8cc2 100644
--- a/perl/Amanda/Recovery/Planner.pm
+++ b/perl/Amanda/Recovery/Planner.pm
@@ -235,16 +235,24 @@ sub make_plan {
my $self = shift;
my %params = @_;
- for my $rq_param (qw(plan_cb dumpspecs)) {
+ for my $rq_param (qw(plan_cb )) {
croak "required parameter '$rq_param' missing"
unless exists $params{$rq_param};
}
my $status = $params{'status'};
my $dumpspecs = $params{'dumpspecs'};
+ my $hostname = $params{'hostname'};
+ my $diskname = $params{'diskname'};
+ my $dump_timestamp = $params{'dump_timestamp'};
+ my $level = $params{'level'};
my $src_labelstr = $params{'src_labelstr'};
# first, get the set of dumps that match these dumpspecs
my @dumps = Amanda::DB::Catalog::get_dumps(dumpspecs => $dumpspecs,
+ hostname => $hostname,
+ diskname => $diskname,
+ dump_timestamp => $dump_timestamp,
+ level => $level,
status => $status,
labelstr => $src_labelstr);
diff --git a/perl/Amanda/Taper/Worker.pm b/perl/Amanda/Taper/Worker.pm
index 7f205be..c501a20 100644
--- a/perl/Amanda/Taper/Worker.pm
+++ b/perl/Amanda/Taper/Worker.pm
@@ -944,7 +944,10 @@ sub setup_and_start_dump {
undef);
my @storage_list = ( $self->{'src_storage'} );
Amanda::Recovery::Planner::make_plan(
- dumpspecs => \@dumpspecs,
+ hostname => $self->{'hostname'},
+ diskname => $self->{'diskname'},
+ dump_timestamp => $self->{'datestamp'},
+ level => $self->{'level'},
changer => $chg,
storage_list => \@storage_list,
only_in_storage => 1,