Type:
Task
Priority:
Major
Resolution:
Unresolved
Fix Version/s:
None
Many users use Mariabackup to build slaves using the process outlined in the following documentation page:
https://mariadb.com/kb/en/library/setting-up-a-replication-slave-with-mariabackup/
One problem with this process is that Mariabackup doesn't back up and restore the original server's entire GTID state, which can be considered to be the value of gtid_current_pos .
https://mariadb.com/kb/en/library/gtid/#gtid_current_pos
The value of gtid_current_pos is constructed from the values of two other system variables--gtid_slave_pos and gtid_binlog_pos .
https://mariadb.com/kb/en/library/gtid/#gtid_slave_pos
https://mariadb.com/kb/en/library/gtid/#gtid_binlog_pos
Mariabackup does back up and restores the original server's value for gtid_slave_pos , because that information is stored in mysql.gtid_slave_pos , which is an InnoDB table.
https://mariadb.com/kb/en/library/mysqlgtid_slave_pos-table/
Mariabackup does not currently back up and restore the original server's gtid_binlog_pos , because that information is stored in the binary logs, which are not backed up.
This means that a server restored from a backup is missing some GTID state by default.
Mariabackup does back up the original server's value of gtid_current_pos in the xtrabackup_binlog_info file.
https://mariadb.com/kb/en/library/files-created-by-mariabackup/#xtrabackup_binlog_info
This means that if a user wants to build a slave using a backup, then they can restore the backup, and then they can extract the original server's gtid_current_pos from xtrabackup_binlog_info :
$ cat xtrabackup_binlog_info
mariadb-bin.000096 568 0-1-2
And then the user would need to use this value to set the value of gtid_slave_pos , and then they could set up replication:
SET GLOBAL gtid_slave_pos='0-1-2';
CHANGE MASTER TO
...
MASTER_USE_GTID=slave_pos;
Some users would prefer if the value of gtid_slave_pos would automatically be set to the original server's gtid_current_pos when a backup was prepared. That way, users would not have to worry about manually fixing the GTID state, and they could just set up replication from a slave created from a backup by doing something like this:
CHANGE MASTER TO
...
MASTER_USE_GTID=slave_pos;
And the slave would automatically know where to start replicating from.
{"report":{"fcp":768.9000000059605,"ttfb":179.2999999821186,"pageVisibility":"visible","entityId":72206,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"c9c0cd45-5c4c-450b-a39e-8c4da4571b12","navigationType":0,"readyForUser":857,"redirectCount":0,"resourceLoadedEnd":415.19999998807907,"resourceLoadedStart":184.90000000596046,"resourceTiming":[{"duration":9.699999988079071,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":184.90000000596046,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":184.90000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":194.59999999403954,"responseStart":0,"secureConnectionStart":0},{"duration":10.099999994039536,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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","startTime":185.19999998807907,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":185.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":195.2999999821186,"responseStart":0,"secureConnectionStart":0},{"duration":71.19999998807907,"initiatorType":"script","name":"https://jira.mariadb.org/s/e9b27a47da5fb0f74a35acd57e9847fb-CDN/lu2bv2/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":185.40000000596046,"connectEnd":185.40000000596046,"connectStart":185.40000000596046,"domainLookupEnd":185.40000000596046,"domainLookupStart":185.40000000596046,"fetchStart":185.40000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":185.40000000596046,"responseEnd":256.59999999403954,"responseStart":256.59999999403954,"secureConnectionStart":185.40000000596046},{"duration":139.09999999403954,"initiatorType":"script","name":"https://jira.mariadb.org/s/c32eb0da7ad9831253f8397e6cc26afd-CDN/lu2bv2/820016/12ta74/2380add21a9a1006587582385952de73/_/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","startTime":185.5,"connectEnd":185.5,"connectStart":185.5,"domainLookupEnd":185.5,"domainLookupStart":185.5,"fetchStart":185.5,"redirectEnd":0,"redirectStart":0,"requestStart":185.5,"responseEnd":324.59999999403954,"responseStart":324.59999999403954,"secureConnectionStart":185.5},{"duration":143.40000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/bc0bcb146314416123c992714ee00ff7-CDN/lu2bv2/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":185.69999998807907,"connectEnd":185.69999998807907,"connectStart":185.69999998807907,"domainLookupEnd":185.69999998807907,"domainLookupStart":185.69999998807907,"fetchStart":185.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":185.69999998807907,"responseEnd":329.09999999403954,"responseStart":329.09999999403954,"secureConnectionStart":185.69999998807907},{"duration":143.59999999403954,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":185.90000000596046,"connectEnd":185.90000000596046,"connectStart":185.90000000596046,"domainLookupEnd":185.90000000596046,"domainLookupStart":185.90000000596046,"fetchStart":185.90000000596046,"redirectEnd":0,"redirectStart":0,"requestStart":185.90000000596046,"responseEnd":329.5,"responseStart":329.5,"secureConnectionStart":185.90000000596046},{"duration":143.90000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":186.09999999403954,"connectEnd":186.09999999403954,"connectStart":186.09999999403954,"domainLookupEnd":186.09999999403954,"domainLookupStart":186.09999999403954,"fetchStart":186.09999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":186.09999999403954,"responseEnd":330,"responseStart":330,"secureConnectionStart":186.09999999403954},{"duration":214.7000000178814,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bv2/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":186.2999999821186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":186.2999999821186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":401,"responseStart":0,"secureConnectionStart":0},{"duration":144,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":186.5,"connectEnd":186.5,"connectStart":186.5,"domainLookupEnd":186.5,"domainLookupStart":186.5,"fetchStart":186.5,"redirectEnd":0,"redirectStart":0,"requestStart":186.5,"responseEnd":330.5,"responseStart":330.5,"secureConnectionStart":186.5},{"duration":214.59999999403954,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bv2/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":186.59999999403954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":186.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":401.19999998807907,"responseStart":0,"secureConnectionStart":0},{"duration":144.30000001192093,"initiatorType":"script","name":"https://jira.mariadb.org/s/719848dd97ebe0663199f49a3936487a-CDN/lu2bv2/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":186.69999998807907,"connectEnd":186.69999998807907,"connectStart":186.69999998807907,"domainLookupEnd":186.69999998807907,"domainLookupStart":186.69999998807907,"fetchStart":186.69999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":186.69999998807907,"responseEnd":331,"responseStart":331,"secureConnectionStart":186.69999998807907},{"duration":225,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":188.19999998807907,"connectEnd":188.19999998807907,"connectStart":188.19999998807907,"domainLookupEnd":188.19999998807907,"domainLookupStart":188.19999998807907,"fetchStart":188.19999998807907,"redirectEnd":0,"redirectStart":0,"requestStart":188.19999998807907,"responseEnd":413.19999998807907,"responseStart":413.19999998807907,"secureConnectionStart":188.19999998807907},{"duration":226.90000000596046,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":188.2999999821186,"connectEnd":188.2999999821186,"connectStart":188.2999999821186,"domainLookupEnd":188.2999999821186,"domainLookupStart":188.2999999821186,"fetchStart":188.2999999821186,"redirectEnd":0,"redirectStart":0,"requestStart":188.2999999821186,"responseEnd":415.19999998807907,"responseStart":415.19999998807907,"secureConnectionStart":188.2999999821186},{"duration":51.80000001192093,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":428.59999999403954,"connectEnd":428.59999999403954,"connectStart":428.59999999403954,"domainLookupEnd":428.59999999403954,"domainLookupStart":428.59999999403954,"fetchStart":428.59999999403954,"redirectEnd":0,"redirectStart":0,"requestStart":428.59999999403954,"responseEnd":480.40000000596046,"responseStart":480.40000000596046,"secureConnectionStart":428.59999999403954},{"duration":341,"initiatorType":"link","name":"https://jira.mariadb.org/s/d5715adaadd168a9002b108b2b039b50-CDN/lu2bv2/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","startTime":672.1999999880791,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":672.1999999880791,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1013.1999999880791,"responseStart":0,"secureConnectionStart":0},{"duration":340.60000002384186,"initiatorType":"link","name":"https://jira.mariadb.org/s/50bc9be5bfead1a25e72c1a9338c94f6-CDN/lu2bv2/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/css/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":672.7999999821186,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":672.7999999821186,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1013.4000000059605,"responseStart":0,"secureConnectionStart":0},{"duration":327.30000001192093,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bv2/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","startTime":673.6999999880791,"connectEnd":673.6999999880791,"connectStart":673.6999999880791,"domainLookupEnd":673.6999999880791,"domainLookupStart":673.6999999880791,"fetchStart":673.6999999880791,"redirectEnd":0,"redirectStart":0,"requestStart":673.6999999880791,"responseEnd":1001,"responseStart":1001,"secureConnectionStart":673.6999999880791},{"duration":331.59999999403954,"initiatorType":"script","name":"https://jira.mariadb.org/s/53a43b6764f587426c7bb9a150184c00-CDN/lu2bv2/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","startTime":674.0999999940395,"connectEnd":674.0999999940395,"connectStart":674.0999999940395,"domainLookupEnd":674.0999999940395,"domainLookupStart":674.0999999940395,"fetchStart":674.0999999940395,"redirectEnd":0,"redirectStart":0,"requestStart":674.0999999940395,"responseEnd":1005.6999999880791,"responseStart":1005.6999999880791,"secureConnectionStart":674.0999999940395},{"duration":332.59999999403954,"initiatorType":"script","name":"https://jira.mariadb.org/s/630dda803a823fdd5771c4338338e018-CDN/lu2bv2/820016/12ta74/e108c7645258ccb43280ed3404e3e949/_/download/contextbatch/js/com.atlassian.jira.plugins.jira-development-integration-plugin:0,-_super,-jira.view.issue,-jira.global,-jira.general,-jira.browse.project,-project.issue.navigator,-atl.general/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":674.4000000059605,"connectEnd":674.4000000059605,"connectStart":674.4000000059605,"domainLookupEnd":674.4000000059605,"domainLookupStart":674.4000000059605,"fetchStart":674.4000000059605,"redirectEnd":0,"redirectStart":0,"requestStart":674.4000000059605,"responseEnd":1007,"responseStart":1007,"secureConnectionStart":674.4000000059605}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":9,"responseStart":179,"responseEnd":182,"domLoading":183,"domInteractive":933,"domContentLoadedEventStart":934,"domContentLoadedEventEnd":1013,"domComplete":1453,"loadEventStart":1453,"loadEventEnd":1455,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":900.5999999940395},{"name":"bigPipe.sidebar-id.end","time":901.2999999821186},{"name":"bigPipe.activity-panel-pipe-id.start","time":901.5},{"name":"bigPipe.activity-panel-pipe-id.end","time":905},{"name":"activityTabFullyLoaded","time":1023.5999999940395}],"measures":[],"correlationId":"53ccb67cc7ac46","effectiveType":"4g","downlink":9.2,"rtt":0,"serverDuration":113,"dbReadsTimeInMs":22,"dbConnsTimeInMs":32,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}