Maik Aussendorf <maik.aussend...@bareos.com> writes:

> Am 08.02.2017 um 20:29 schrieb Kjetil Torgrim Homme:
>> so, trying out restore:
>>
>>   08-Feb 19:28 dump-sd JobId 1457958: Forward spacing Volume
>> "incr/Incr-6247" to file:block 1:970713522.
>>   08-Feb 19:28 ece026-snapshot-fd JobId 1457958: Error:
>> restore.c:1239 Write error on
>> /tmp/bacula-restores/_percona/xbstream.0001457954: Child exited with
>> code -268435457
>>   08-Feb 19:28 ece026-snapshot-fd JobId 1457958: Error: Restore
>> command returned non-zero value: 1, message:
> Here after 'message: ' the stdError output  of the xbstream is
> expected.

>> I tried to grab the error message from xbstream, but was unable to patch
>> the python plugin to log it.  however strace delivers the goods, sort
> You can try to use 'stdOut' instead of 'stdError' in line 347 (obviously
> stdErr is empty in you case). I will print both values in future
> versions.

yes, I don't understand this.  the error message from xbstream is
clearly being written to stderr, I don't understand why it doesn't work
(I changed the plugin code to pass stderr=PIPE to Popen.)

>> of.  the xbstream process reads and reads and reads, and then:
>>
>>   write(2, "xb_stream_read_chunk(): invalid checksum at offset
>> 0xa00025: expected 0xf96cf5a6, read 0xc7ae89da.\n", 99) = 99
>>
>> at this point I would like to see if the problem is in the backup or in
>> the restore.  can I extract the stream to a plain file on the client and
>> run xbstream on it manually?  other hints on how to debug the problem?
>
> Yes, you can. E.g. restore to a client with plugins disabled, then you
> will get the plain xbstream-file.

ah!  ok, so I did this.  the resulting file has 8 NUL bytes at
the beginning which I chopped off, and I get the same error on stderr
when running manually:

  $ xbstream -x -C extr < /tmp/offs
  xb_stream_read_chunk(): invalid checksum at offset 0xa00025: expected 
0xdfbd8ba6, read 0x8866f355.

(the checksums are different from the previous mail since I made a
new full backup, but the offset is the same.)

running xtrabackup manually gives a file which xbstream accepts.  it is
just 3 bytes smaller than /tmp/offs.

the size of the file is 121330646, 115 MiB - the error occurs just after
the 10 MiB mark.  at the 10 MiB mark there are 41 NUL bytes before there
is a new header - this looks the same in the working dump taken
manually.

  ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
  ^@^@^@^@^@^@^@^@^@XBSTCK01^@P^G^@^@^@ibdata1[...]

in other words, at offset 0xa00025 there are 4 NUL bytes, then there is
the new header.

the md5sum's do not match up:

from Bareos database:
  1b8aee24ef2856fe0dbfe42214f0c383  /_percona/xbstream.0001459278

restored without plugin:
  f776b9287ab4cf9e349da41b7aa462b4  /tmp/xbstream.0001459278

above file with first 8 NUL bytes removed:
  d4f5949c8cc8a2914909b918c0e88bdb  /tmp/offs

> I suggest that you first check, that xtrabackup produces a valid stream
> that can be successfully used by xbstream again. If that works you can
> have a look about the stream going into Bareos and what comes back on
> restore.

thank you for your hints!  I'm trying to dig further...

-- 
Kjetil T. Homme
Redpill Linpro AS - Changing the game

-- 
You received this message because you are subscribed to the Google Groups 
"bareos-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to bareos-users+unsubscr...@googlegroups.com.
To post to this group, send email to bareos-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to