Type:
Bug
Priority:
Major
Resolution:
Unresolved
Affects Version/s:
10.5 , 10.6 , 10.11 , 11.0(EOL) , 11.1(EOL) , 11.2(EOL) , 11.3(EOL) , 11.4 , 11.5(EOL)
Environment:
Ubuntu 22.04, n.a.
Szenario:
1. Physical full backup with mariadb-backup (--backup)
2. Prepare of this backup (--prepare)
3. Prepare with export for partial physical restore (--prepare --export --database=test)
4. DISCARD/cp/chown/IMPORT of tablespace
Up to here everything is fine. NO DB restart is done.
5. Physical full backup with mariadb-backup (--backup) again.
*.ibd file is missing in backup:
rw-rw--- 1 mysql mysql 65 Jun 18 17:33 /tmp/bck/daily/bck_full_2024-06-18/test/db.opt
rw-rw--- 1 mysql mysql 1100 Jun 18 17:33 /tmp/bck/daily/bck_full_2024-06-18/test/test.frm
and we get in mariadb-backup output the following message:
...
[00] 2024-06-18 17:33:02 mariabackup: Generating a list of tablespaces
[00] 2024-06-18 17:33:02 DDL tracking : delete 1595 "./test/test.ibd"
...
[01] 2024-06-18 17:33:05 Warning: We assume the table was dropped during xtrabackup execution and ignore the tablespace ./test/test.ibd
...
[00] 2024-06-18 17:33:20 Redo log (from LSN 52224057258 to 52224510260) was copied.
[00] 2024-06-18 17:33:20 completed OK!
That means, that this backup is broken now an cannot be used for future partial or full restore!!!
Steps to reproduce:
PORT=3321
DATADIR=/home/mysql/database/mariadb-1011/data
BACKUPNAME=bck_full_2024-06-18
BACKUPDIR=/tmp/bck
rm -rf ${BACKUPDIR}/daily/${BACKUPNAME}
/home/mysql/product/mariadb-10.11/bin/mariabackup --user=brman --password=secret --host=127.0.0.1 --port=3321 --backup --target-dir=/tmp/bck/daily/bck_full_2024-06-18
/home/mysql/product/mariadb-10.11/bin/mariabackup --user=brman --password=secret --host=127.0.0.1 --port=3321 --prepare --target-dir=/tmp/bck/daily/bck_full_2024-06-18
/home/mysql/product/mariadb-10.11/bin/mariabackup --user=brman --host=127.0.0.1 --port=3321 --prepare --export --databases=test --target-dir=/tmp/bck/daily/bck_full_2024-06-18
ALTER TABLE `test`.`test` DISCARD TABLESPACE;
cp /tmp/bck/daily/bck_full_2024-06-18/test/test.cfg /home/mysql/database/mariadb-1011/data/test/test.cfg
cp /tmp/bck/daily/bck_full_2024-06-18/test/test.ibd /home/mysql/database/mariadb-1011/data/test/test.ibd
chown mysql: /home/mysql/database/mariadb-1011/data/test/test.cfg /home/mysql/database/mariadb-1011/data/test/test.ibd
ALTER TABLE `test`.`test` IMPORT TABLESPACE;
rm /home/mysql/database/mariadb-1011/data/test/test.cfg
rm /tmp/bck/daily/bck_full_2024-06-18/test/test.cfg
no restart
/home/mysql/product/mariadb-10.11/bin/mariabackup --user=brman --password=secret --host=127.0.0.1 --port=3321 --backup --target-dir=/tmp/bck/daily/bck_full_2024-06-18
{"report":{"fcp":2953.1000003814697,"ttfb":1182.8000001907349,"pageVisibility":"visible","entityId":129653,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"669c6d19-1413-48b6-a6eb-ba80f76daa20","navigationType":0,"readyForUser":3028.2000007629395,"redirectCount":0,"resourceLoadedEnd":4126.60000038147,"resourceLoadedStart":1188.9000005722046,"resourceTiming":[{"duration":1281.0999994277954,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":1188.9000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1188.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2470,"responseStart":0,"secureConnectionStart":0},{"duration":1281.1999998092651,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1189.1000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1189.1000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2470.300000190735,"responseStart":0,"secureConnectionStart":0},{"duration":1292.3999996185303,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":1189.4000005722046,"connectEnd":1189.4000005722046,"connectStart":1189.4000005722046,"domainLookupEnd":1189.4000005722046,"domainLookupStart":1189.4000005722046,"fetchStart":1189.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":1189.4000005722046,"responseEnd":2481.800000190735,"responseStart":2481.800000190735,"secureConnectionStart":1189.4000005722046},{"duration":1350.9000005722046,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":1189.5,"connectEnd":1189.5,"connectStart":1189.5,"domainLookupEnd":1189.5,"domainLookupStart":1189.5,"fetchStart":1189.5,"redirectEnd":0,"redirectStart":0,"requestStart":1189.5,"responseEnd":2540.4000005722046,"responseStart":2540.4000005722046,"secureConnectionStart":1189.5},{"duration":1354.4000005722046,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":1189.8000001907349,"connectEnd":1189.8000001907349,"connectStart":1189.8000001907349,"domainLookupEnd":1189.8000001907349,"domainLookupStart":1189.8000001907349,"fetchStart":1189.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":1189.8000001907349,"responseEnd":2544.2000007629395,"responseStart":2544.2000007629395,"secureConnectionStart":1189.8000001907349},{"duration":1355.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":1190,"connectEnd":1190,"connectStart":1190,"domainLookupEnd":1190,"domainLookupStart":1190,"fetchStart":1190,"redirectEnd":0,"redirectStart":0,"requestStart":1190,"responseEnd":2545.300000190735,"responseStart":2545.300000190735,"secureConnectionStart":1190},{"duration":1355.5999994277954,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":1190.4000005722046,"connectEnd":1190.4000005722046,"connectStart":1190.4000005722046,"domainLookupEnd":1190.4000005722046,"domainLookupStart":1190.4000005722046,"fetchStart":1190.4000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":1190.4000005722046,"responseEnd":2546,"responseStart":2546,"secureConnectionStart":1190.4000005722046},{"duration":1439.6000003814697,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":1190.6000003814697,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1190.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2630.2000007629395,"responseStart":0,"secureConnectionStart":0},{"duration":1356.1999998092651,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":1190.7000007629395,"connectEnd":1190.7000007629395,"connectStart":1190.7000007629395,"domainLookupEnd":1190.7000007629395,"domainLookupStart":1190.7000007629395,"fetchStart":1190.7000007629395,"redirectEnd":0,"redirectStart":0,"requestStart":1190.7000007629395,"responseEnd":2546.9000005722046,"responseStart":2546.9000005722046,"secureConnectionStart":1190.7000007629395},{"duration":1439.5999994277954,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":1190.9000005722046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1190.9000005722046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2630.5,"responseStart":0,"secureConnectionStart":0},{"duration":1356.9000005722046,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":1191,"connectEnd":1191,"connectStart":1191,"domainLookupEnd":1191,"domainLookupStart":1191,"fetchStart":1191,"redirectEnd":0,"redirectStart":0,"requestStart":1191,"responseEnd":2547.9000005722046,"responseStart":2547.9000005722046,"secureConnectionStart":1191},{"duration":2572.800000190735,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":1192,"connectEnd":1192,"connectStart":1192,"domainLookupEnd":1192,"domainLookupStart":1192,"fetchStart":1192,"redirectEnd":0,"redirectStart":0,"requestStart":1192,"responseEnd":3764.800000190735,"responseStart":3764.800000190735,"secureConnectionStart":1192},{"duration":2934.6000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":1192,"connectEnd":1192,"connectStart":1192,"domainLookupEnd":1192,"domainLookupStart":1192,"fetchStart":1192,"redirectEnd":0,"redirectStart":0,"requestStart":1192,"responseEnd":4126.60000038147,"responseStart":4126.60000038147,"secureConnectionStart":1192},{"duration":1135.8000001907349,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":2642.6000003814697,"connectEnd":2642.6000003814697,"connectStart":2642.6000003814697,"domainLookupEnd":2642.6000003814697,"domainLookupStart":2642.6000003814697,"fetchStart":2642.6000003814697,"redirectEnd":0,"redirectStart":0,"requestStart":2642.6000003814697,"responseEnd":3778.4000005722046,"responseStart":3778.4000005722046,"secureConnectionStart":2642.6000003814697},{"duration":1212,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":2946.300000190735,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":2946.300000190735,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":4158.300000190735,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":1013,"responseStart":1183,"responseEnd":1186,"domLoading":1186,"domInteractive":4159,"domContentLoadedEventStart":4159,"domContentLoadedEventEnd":4220,"domComplete":5441,"loadEventStart":5441,"loadEventEnd":5442,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":4130.700000762939},{"name":"bigPipe.sidebar-id.end","time":4131.60000038147},{"name":"bigPipe.activity-panel-pipe-id.start","time":4131.700000762939},{"name":"bigPipe.activity-panel-pipe-id.end","time":4134},{"name":"activityTabFullyLoaded","time":4234.300000190735}],"measures":[],"correlationId":"b5351e0f812f42","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":107,"dbReadsTimeInMs":10,"dbConnsTimeInMs":18,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I tried now various different things to workaround this problem:
1.)
start transaction;
SELECT 1 from test.test LIMIT 0;
commit;
2.)
start transaction;
delete from mysql.innodb_table_stats limit 1;
rollback;
3.)
mariadb-backup --lock-ddl-per-table
4.)
flush tables with read lock;
unlock tables;
5.)
start transaction;
delete from test.test limit 10;
rollback;
6.)
start transaction;
delete from test.test limit 1;
commit;
7.)
FLUSH TABLES test.test FOR EXPORT;
unlock tables;
None of those helped to workaround the problem. So I am really happy if you have a least a hint so we can continue to develop our application...