[MDEV-21951] mariabackup SST fail if data-directory have lost+found directory Created: 2020-03-16  Updated: 2021-04-19  Resolved: 2020-10-20

Status: Closed
Project: MariaDB Server
Component/s: Galera SST, mariabackup
Affects Version/s: 10.2.31
Fix Version/s: 10.2.35, 10.3.26, 10.4.16, 10.5.7, 10.6.0

Type: Bug Priority: Major
Reporter: Pramod Mahto Assignee: Julius Goryavsky
Resolution: Fixed Votes: 1
Labels: None

Issue Links:
Relates
relates to MDEV-8064 ignore-db-dir=lost+found not working Stalled
relates to MDEV-10303 rsync_sst_rsync: ignore lost+found du... Closed
relates to MDEV-10487 Galera SST using rsync does not filte... Closed
relates to MDEV-21295 SST should not remove ignore-db-dir d... Open

 Description   

Mariabackup SST fail if database directory contains lost+found

 rm: cannot remove ‘/data/lib/mariadb/lost+found’: Permission denied

scripts/wsrep_sst_mariabackup.sh does not exclude lost+found directory while performing SST

https://github.com/MariaDB/server/blob/93ac7ae70ff000353538f732899b421a3f2ea7ce/scripts/wsrep_sst_mariabackup.sh



 Comments   
Comment by Jan Lindström (Inactive) [ 2020-03-16 ]

Some idea can be see https://github.com/mariadb/server/commit/44e3046d3b09a21e21295979d6ddad9f332ebadd

Comment by Marko Mäkelä [ 2020-03-16 ]

I think that the mariabackup --databases-exclude option should be applicable. It probably expects a regular expression as a parameter, and the + likely is a regular expression meta-character that will need escaping. You should also test that the argument will only match a full string, in case someone does CREATE DATABASE `#mysql50#not_lost+found`;.

Comment by Julius Goryavsky [ 2020-03-31 ]

Fixed, patch here: https://github.com/MariaDB/server/commit/909cd1a6ba52b28a705190d7576a15cd38ebea9e

Comment by Jan Lindström (Inactive) [ 2020-03-31 ]

Please add mtr test as described on git comment.

Comment by Julius Goryavsky [ 2020-10-19 ]

Added a test that checks the correct operation in the presence of databases, which can potentially cause problems when checking names. Also patch has been rebased to 10.2 branch (latest revision):

https://github.com/MariaDB/server/commit/e1875eeb251aa83a3dc8ab148228d2de42671699

Comment by Jan Lindström (Inactive) [ 2020-10-20 ]

ok to push.

Comment by Julius Goryavsky [ 2020-10-20 ]

merged with head revision, https://github.com/MariaDB/server/commit/888010d9dd5409c48caf01fb0f465c98caa232c7

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