Type:
Task
Priority:
Major
Resolution:
Unresolved
Fix Version/s:
None
When using Mariabackup or MariaDB Backup, users are supposed to use the same version of Mariabackup as the server that is being used. From the KB:
A MariaDB Server version can often be backed up with most other Mariabackup releases in the same release series. For example, MariaDB 10.2.21 and MariaDB 10.2.22 are both in the MariaDB 10.2 release series, so MariaDB Server from MariaDB 10.2.21 could be backed up by Mariabackup from MariaDB 10.2.22, or vice versa.
However, occasionally, a MariaDB Server or Mariabackup release will include bug fixes that will break compatibility with previous releases. For example, the fix for MDEV-13564 changed the InnoDB redo log format in MariaDB 10.2.19 which broke compatibility with previous releases. To be safest, a MariaDB Server release should generally be backed up with the Mariabackup release that has the same version number.
https://mariadb.com/kb/en/mariabackup-overview/#compatibility-of-mariabackup-releases-with-mariadb-server-releases
However, Mariabackup doesn't actually check the server version and throw an error, if it is different.
In some cases, the --backup step might even seem to succeed, and then it will only fail during the --prepare step.
If the Mariabackup version is newer than the server, then the user might see an Upgrade after a crash is not supported error during the --backup step, like this:
$ sudo mariabackup --backup \
> --target-dir=/tmp/backup/ \
> --user=root \
> --socket=/tmp/mysql.sock
[00] 2020-06-08 21:34:18 Connecting to MySQL server host: localhost, user: root, password: not set, port: not set, socket: /tmp/mysql.sock
[00] 2020-06-08 21:34:18 Using server version 10.4.13-MariaDB
mariabackup based on MariaDB server 10.5.2-0-MariaDB Linux (x86_64)
[00] 2020-06-08 21:34:18 uses posix_fadvise().
[00] 2020-06-08 21:34:18 cd to /tmp/mariadb/
[00] 2020-06-08 21:34:18 open files limit requested 0, set to 1024
[00] 2020-06-08 21:34:18 mariabackup: using the following InnoDB configuration:
[00] 2020-06-08 21:34:18 innodb_data_home_dir =
[00] 2020-06-08 21:34:18 innodb_data_file_path = ibdata1:12M:autoextend
[00] 2020-06-08 21:34:18 innodb_log_group_home_dir = ./
[00] 2020-06-08 21:34:18 InnoDB: Using Linux native AIO
2020-06-08 21:34:18 0 [Note] InnoDB: Number of pools: 1
2020-06-08 21:34:18 0 [ERROR] InnoDB: Upgrade after a crash is not supported. The redo log was created with MariaDB 10.4.13.
[00] 2020-06-08 21:34:18 Error: cannot read redo log header
If the Mariabackup version is older than the server, then the user might see an Unsupported redo log format error during the --prepare step, like this:
$ sudo ./bin/mariabackup --prepare \
> --target-dir=/tmp/backup/
./bin/mariabackup based on MariaDB server 10.4.13-MariaDB Linux (x86_64)
[00] 2020-06-08 21:38:05 cd to /tmp/backup/
[00] 2020-06-08 21:38:05 This target seems to be not prepared yet.
[00] 2020-06-08 21:38:05 mariabackup: using the following InnoDB configuration for recovery:
[00] 2020-06-08 21:38:05 innodb_data_home_dir = .
[00] 2020-06-08 21:38:05 innodb_data_file_path = ibdata1:12M:autoextend
[00] 2020-06-08 21:38:05 innodb_log_group_home_dir = .
[00] 2020-06-08 21:38:05 InnoDB: Using Linux native AIO
[00] 2020-06-08 21:38:05 Starting InnoDB instance for recovery.
[00] 2020-06-08 21:38:05 mariabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
2020-06-08 21:38:05 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2020-06-08 21:38:05 0 [Note] InnoDB: Uses event mutexes
2020-06-08 21:38:05 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-06-08 21:38:05 0 [Note] InnoDB: Number of pools: 1
2020-06-08 21:38:05 0 [Note] InnoDB: Using SSE2 crc32 instructions
./bin/mariabackup: O_TMPFILE is not supported on /tmp (disabling future attempts)
2020-06-08 21:38:05 0 [Note] InnoDB: Initializing buffer pool, total size = 100M, instances = 1, chunk size = 100M
2020-06-08 21:38:05 0 [Note] InnoDB: Completed initialization of buffer pool
2020-06-08 21:38:05 0 [Note] InnoDB: page_cleaner coordinator priority: -20
2020-06-08 21:38:05 0 [ERROR] InnoDB: Unsupported redo log format. The redo log was created with Backup 10.5.2-0-MariaDB.
2020-06-08 21:38:05 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
[00] FATAL ERROR: 2020-06-08 21:38:05 mariabackup: innodb_init() returned 11 (Generic error).
I think it would be a good idea for Mariabackup to have a better version check. For example, if the user is using Mariabackup 10.4, then it should throw an error if the server isn't running MariaDB Server 10.4.
relates to
MDEV-23394
mariadb --prepare --export fails with "Upgrade after crash is not supported" and error 11
Open
{"report":{"fcp":845.2999999523163,"ttfb":138.5,"pageVisibility":"visible","entityId":88032,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"d217d28f-fba5-4c50-85b8-e47414f7cd22","navigationType":0,"readyForUser":905.5,"redirectCount":0,"resourceLoadedEnd":1007.5999999046326,"resourceLoadedStart":143.59999990463257,"resourceTiming":[{"duration":236.20000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":143.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":143.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":379.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":236,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":143.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":143.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":379.90000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":245.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":144,"connectEnd":144,"connectStart":144,"domainLookupEnd":144,"domainLookupStart":144,"fetchStart":144,"redirectEnd":0,"redirectStart":0,"requestStart":144,"responseEnd":389.5,"responseStart":389.5,"secureConnectionStart":144},{"duration":311,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/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":144.09999990463257,"connectEnd":144.09999990463257,"connectStart":144.09999990463257,"domainLookupEnd":144.09999990463257,"domainLookupStart":144.09999990463257,"fetchStart":144.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":144.09999990463257,"responseEnd":455.09999990463257,"responseStart":455.09999990463257,"secureConnectionStart":144.09999990463257},{"duration":314.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":144.20000004768372,"connectEnd":144.20000004768372,"connectStart":144.20000004768372,"domainLookupEnd":144.20000004768372,"domainLookupStart":144.20000004768372,"fetchStart":144.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":144.20000004768372,"responseEnd":458.7000000476837,"responseStart":458.7000000476837,"secureConnectionStart":144.20000004768372},{"duration":314.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":144.40000009536743,"connectEnd":144.40000009536743,"connectStart":144.40000009536743,"domainLookupEnd":144.40000009536743,"domainLookupStart":144.40000009536743,"fetchStart":144.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":144.40000009536743,"responseEnd":459.2000000476837,"responseStart":459.2000000476837,"secureConnectionStart":144.40000009536743},{"duration":315.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":144.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":144.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":460,"responseStart":0,"secureConnectionStart":0},{"duration":315.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":144.5,"connectEnd":144.5,"connectStart":144.5,"domainLookupEnd":144.5,"domainLookupStart":144.5,"fetchStart":144.5,"redirectEnd":0,"redirectStart":0,"requestStart":144.5,"responseEnd":459.59999990463257,"responseStart":459.59999990463257,"secureConnectionStart":144.5},{"duration":315.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":144.59999990463257,"connectEnd":144.59999990463257,"connectStart":144.59999990463257,"domainLookupEnd":144.59999990463257,"domainLookupStart":144.59999990463257,"fetchStart":144.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":144.59999990463257,"responseEnd":460.09999990463257,"responseStart":460.09999990463257,"secureConnectionStart":144.59999990463257},{"duration":315.7999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/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":144.79999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":144.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":460.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":315.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/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":144.90000009536743,"connectEnd":144.90000009536743,"connectStart":144.90000009536743,"domainLookupEnd":144.90000009536743,"domainLookupStart":144.90000009536743,"fetchStart":144.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":144.90000009536743,"responseEnd":460.7000000476837,"responseStart":460.7000000476837,"secureConnectionStart":144.90000009536743},{"duration":860.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":145.70000004768372,"connectEnd":145.70000004768372,"connectStart":145.70000004768372,"domainLookupEnd":145.70000004768372,"domainLookupStart":145.70000004768372,"fetchStart":145.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":145.70000004768372,"responseEnd":1006.5,"responseStart":1006.5,"secureConnectionStart":145.70000004768372},{"duration":857.3999998569489,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":150.20000004768372,"connectEnd":150.20000004768372,"connectStart":150.20000004768372,"domainLookupEnd":150.20000004768372,"domainLookupStart":150.20000004768372,"fetchStart":150.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":150.20000004768372,"responseEnd":1007.5999999046326,"responseStart":1007.5999999046326,"secureConnectionStart":150.20000004768372},{"duration":279,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":601.2000000476837,"connectEnd":601.2000000476837,"connectStart":601.2000000476837,"domainLookupEnd":601.2000000476837,"domainLookupStart":601.2000000476837,"fetchStart":601.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":601.2000000476837,"responseEnd":880.2000000476837,"responseStart":880.2000000476837,"secureConnectionStart":601.2000000476837}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":9,"responseStart":138,"responseEnd":145,"domLoading":141,"domInteractive":1023,"domContentLoadedEventStart":1023,"domContentLoadedEventEnd":1057,"domComplete":2156,"loadEventStart":2156,"loadEventEnd":2158,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1012.4000000953674},{"name":"bigPipe.sidebar-id.end","time":1013.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":1013.2999999523163},{"name":"bigPipe.activity-panel-pipe-id.end","time":1015.7999999523163},{"name":"activityTabFullyLoaded","time":1068.0999999046326}],"measures":[],"correlationId":"32e74b5750b95f","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":75,"dbReadsTimeInMs":13,"dbConnsTimeInMs":20,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}