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":1065.8000001907349,"ttfb":250.5,"pageVisibility":"visible","entityId":129653,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"5c056623-b176-46ef-a9a2-9fb0ffa00cf4","navigationType":0,"readyForUser":1171.5999999046326,"redirectCount":0,"resourceLoadedEnd":1203.7000002861023,"resourceLoadedStart":257.2000002861023,"resourceTiming":[{"duration":285,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":257.2000002861023,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":257.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":542.2000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":286.30000019073486,"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":257.40000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":257.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":543.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":341,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":257.59999990463257,"connectEnd":257.59999990463257,"connectStart":257.59999990463257,"domainLookupEnd":257.59999990463257,"domainLookupStart":257.59999990463257,"fetchStart":257.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":257.59999990463257,"responseEnd":598.5999999046326,"responseStart":598.5999999046326,"secureConnectionStart":257.59999990463257},{"duration":472.59999990463257,"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":257.80000019073486,"connectEnd":257.80000019073486,"connectStart":257.80000019073486,"domainLookupEnd":257.80000019073486,"domainLookupStart":257.80000019073486,"fetchStart":257.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":257.80000019073486,"responseEnd":730.4000000953674,"responseStart":730.4000000953674,"secureConnectionStart":257.80000019073486},{"duration":476.19999980926514,"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":258.2000002861023,"connectEnd":258.2000002861023,"connectStart":258.2000002861023,"domainLookupEnd":258.2000002861023,"domainLookupStart":258.2000002861023,"fetchStart":258.2000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":258.2000002861023,"responseEnd":734.4000000953674,"responseStart":734.4000000953674,"secureConnectionStart":258.2000002861023},{"duration":476.5,"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":258.30000019073486,"connectEnd":258.30000019073486,"connectStart":258.30000019073486,"domainLookupEnd":258.30000019073486,"domainLookupStart":258.30000019073486,"fetchStart":258.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":258.30000019073486,"responseEnd":734.8000001907349,"responseStart":734.8000001907349,"secureConnectionStart":258.30000019073486},{"duration":476.6000003814697,"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":258.59999990463257,"connectEnd":258.59999990463257,"connectStart":258.59999990463257,"domainLookupEnd":258.59999990463257,"domainLookupStart":258.59999990463257,"fetchStart":258.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":258.59999990463257,"responseEnd":735.2000002861023,"responseStart":735.2000002861023,"secureConnectionStart":258.59999990463257},{"duration":490.40000009536743,"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":258.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":258.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":749.2000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":476.7000002861023,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":259,"connectEnd":259,"connectStart":259,"domainLookupEnd":259,"domainLookupStart":259,"fetchStart":259,"redirectEnd":0,"redirectStart":0,"requestStart":259,"responseEnd":735.7000002861023,"responseStart":735.7000002861023,"secureConnectionStart":259},{"duration":490.2000002861023,"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":259.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":259.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":749.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":477,"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":259.30000019073486,"connectEnd":259.30000019073486,"connectStart":259.30000019073486,"domainLookupEnd":259.30000019073486,"domainLookupStart":259.30000019073486,"fetchStart":259.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":259.30000019073486,"responseEnd":736.3000001907349,"responseStart":736.3000001907349,"secureConnectionStart":259.30000019073486},{"duration":938.7000002861023,"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":260.09999990463257,"connectEnd":260.09999990463257,"connectStart":260.09999990463257,"domainLookupEnd":260.09999990463257,"domainLookupStart":260.09999990463257,"fetchStart":260.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":260.09999990463257,"responseEnd":1198.8000001907349,"responseStart":1198.8000001907349,"secureConnectionStart":260.09999990463257},{"duration":939,"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":264.7000002861023,"connectEnd":264.7000002861023,"connectStart":264.7000002861023,"domainLookupEnd":264.7000002861023,"domainLookupStart":264.7000002861023,"fetchStart":264.7000002861023,"redirectEnd":0,"redirectStart":0,"requestStart":264.7000002861023,"responseEnd":1203.7000002861023,"responseStart":1203.5999999046326,"secureConnectionStart":264.7000002861023},{"duration":430.2000002861023,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":770.5,"connectEnd":770.5,"connectStart":770.5,"domainLookupEnd":770.5,"domainLookupStart":770.5,"fetchStart":770.5,"redirectEnd":0,"redirectStart":0,"requestStart":770.5,"responseEnd":1200.7000002861023,"responseStart":1200.7000002861023,"secureConnectionStart":770.5},{"duration":118.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1104,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1104,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1222.5,"responseStart":0,"secureConnectionStart":0},{"duration":157.40000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/css/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1216.3000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1216.3000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1373.7000002861023,"responseStart":0,"secureConnectionStart":0},{"duration":116.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/e65b778d185daf5aee24936755b43da6/_/download/contextbatch/js/browser-metrics-plugin.contrib,-_super,-project.issue.navigator,-jira.view.issue,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true&whisper-enabled=true","startTime":1217.4000000953674,"connectEnd":1217.4000000953674,"connectStart":1217.4000000953674,"domainLookupEnd":1217.4000000953674,"domainLookupStart":1217.4000000953674,"fetchStart":1217.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":1217.4000000953674,"responseEnd":1333.9000000953674,"responseStart":1333.9000000953674,"secureConnectionStart":1217.4000000953674},{"duration":121.30000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/097ae97cb8fbec7d6ea4bbb1f26955b9-CDN/lu2cib/820016/12ta74/be4b45e9cec53099498fa61c8b7acba4/_/download/contextbatch/js/jira.project.sidebar,-_super,-project.issue.navigator,-jira.general,-jira.browse.project,-jira.view.issue,-jira.global,-atl.general,-com.atlassian.jira.projects.sidebar.init/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true&whisper-enabled=true","startTime":1218.0999999046326,"connectEnd":1218.0999999046326,"connectStart":1218.0999999046326,"domainLookupEnd":1218.0999999046326,"domainLookupStart":1218.0999999046326,"fetchStart":1218.0999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1218.0999999046326,"responseEnd":1339.4000000953674,"responseStart":1339.4000000953674,"secureConnectionStart":1218.0999999046326}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":99,"responseStart":250,"responseEnd":256,"domLoading":255,"domInteractive":1324,"domContentLoadedEventStart":1324,"domContentLoadedEventEnd":1373,"domComplete":1668,"loadEventStart":1668,"loadEventEnd":1668,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1285.5999999046326},{"name":"bigPipe.sidebar-id.end","time":1286.4000000953674},{"name":"bigPipe.activity-panel-pipe-id.start","time":1286.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":1289.0999999046326},{"name":"activityTabFullyLoaded","time":1389.9000000953674}],"measures":[],"correlationId":"7f4e82e6322618","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":97,"dbReadsTimeInMs":10,"dbConnsTimeInMs":17,"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...