[MDEV-22872] Issues unpacking backup with mbstream Created: 2020-06-11  Updated: 2021-01-20  Resolved: 2021-01-20

Status: Closed
Project: MariaDB Server
Component/s: Backup
Affects Version/s: 10.3.17
Fix Version/s: 10.3.17

Type: Bug Priority: Major
Reporter: Matej Žerovnik Assignee: Robert Bindar
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

CentOS 8.x



 Description   

When extracting mbstream file, I get an error about missing folder where the original backup was located.

$ pwd
/var/lib/mysql/mysqldumps/
$ lz4 -d backup.stream.gz | mbstream  -x -C .
mbstream: Can't create directory '/opt/mariabackup/base/2020-06-09_03-00-01//' (Errcode: 2 "No such file or directory")
[00] 2020-06-11 12:40:31 mbstream: failed to create file.

If I manually create folder path, the content is extracted successfully and xtrabackup_info file is placed in the original backup folder.

$ ll /opt/mariabackup/base/2020-06-09_03-00-01/
total 4
-rw-r----- 1 root root 652 Jun 11 13:14 xtrabackup_info



 Comments   
Comment by Matej Žerovnik [ 2020-06-11 ]

@robertbindar, @Robert Bindar

Comment by Robert Bindar [ 2020-06-11 ]

Ack matejzero, thanks again! I will investigate and let you know.

Comment by Tim Yan [ 2020-10-12 ]

It seems the mbstream is reusing the --extra-lsndir value used in the original backup command line. If the location was a tmp directory and deleted, the mbstream will fail. It may also fail if you unpack the same backup file twice, because the xtrabackup_info will be there already.

The only info we found related to the tmp directory is in the xtrabackup_info itself and its copies.

Comment by Matej Žerovnik [ 2021-01-04 ]

Is there any news regarding a fix?

This is hurting us more and more and a quick feedback would be useful, so we know if we should wait or search for a different solution.

Thanks.

Comment by Robert Bindar [ 2021-01-20 ]

Hei Tim and Matej, very sorry for being unresponsive here, for some reason Jira didn't notify me for your messages. I have a quick instinct to say I merged myself a Pull Request fixing this issue a while ago, but it's probably in a newer MariaDB version. I'll investigate this tomorrow first thing in the morning.

Comment by Matej Žerovnik [ 2021-01-20 ]

I had a look on GitHub and noticed that there was indeed a commit into a newer version in 10.3 train. We upgraded to newer version and it works.

I don't know which version fixed it as I can't find the commit now.

Comment by Robert Bindar [ 2021-01-20 ]

Hey Matej, what a nice thing that the bug was solved for you with just upgrading. The contribution I was speaking about is: https://github.com/MariaDB/server/commit/c0db3fe6dabd2cb0df9bf532f54f9e8d233fa499
From what I can see it was merged from 10.3.19 upwards, so I'm guessing that's why you .17 version didn't have the bug fixed. Sorry again for the confusion and I hope the experience for you is a lot better with this bug not causing trouble anymore.

Comment by Robert Bindar [ 2021-01-20 ]

Closing this for now as it seems the issue was resolved. Feel free to reopen if the bug can be reproduced again. Thanks again for keeping an eye on this.

Generated at Thu Feb 08 09:18:07 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.