[MDEV-29134] MariaBackup fails with corrupt log error | [ERROR] InnoDB: Malformed log record Created: 2022-07-19  Updated: 2023-03-03

Status: Confirmed
Project: MariaDB Server
Component/s: mariabackup
Affects Version/s: 10.6.7
Fix Version/s: 10.5, 10.6

Type: Bug Priority: Major
Reporter: Pon Suresh Pandian (Inactive) Assignee: Vladislav Lesin
Resolution: Unresolved Votes: 0
Labels: mariabackup
Environment:

Red Hat Enterprise Linux Server release 7.9 (Maipo)


Issue Links:
Duplicate

 Description   

Hi Team,

MariaDB backups failed with log file corruption. Recently we upgraded the mariadb version from 10.4.17 ES to 10.6.7 ES version..

It's standalone server, We had an OS patch on that server about 48 hours before the log corruption but we had a successful backup after the OS patching.

mysql@k0008033 /xtra200/mysql/data $ mariabackup --defaults-file=/trvapps/mariadb/tpcadmin/dbajobs/.backup-my.cnf --backup --history --parallel=2 --target-dir=/xtra400/mariadb/BKUP/daily
[00] 2022-07-18 09:51:15 Connecting to MariaDB server host: localhost, user: root, password: set, port: not set, socket: not set
[00] 2022-07-18 09:51:15 Using server version 10.6.7-3-MariaDB-enterprise-log
mariabackup based on MariaDB server 10.6.7-3-MariaDB Linux (x86_64)
[00] 2022-07-18 09:51:15 uses posix_fadvise().
[00] 2022-07-18 09:51:15 cd to /xtra200/mysql/data/
[00] 2022-07-18 09:51:15 open files limit requested 0, set to 1024
[00] 2022-07-18 09:51:15 mariabackup: using the following InnoDB configuration:
[00] 2022-07-18 09:51:15 innodb_data_home_dir =
[00] 2022-07-18 09:51:15 innodb_data_file_path = ibdata1:12M:autoextend
[00] 2022-07-18 09:51:15 innodb_log_group_home_dir = ./
[00] 2022-07-18 09:51:15 InnoDB: Using Linux native AIO
2022-07-18 9:51:15 0 [Note] InnoDB: Number of pools: 1
[00] 2022-07-18 09:51:15 mariabackup: Generating a list of tablespaces
2022-07-18 9:51:15 0 [ERROR] InnoDB: Malformed log record; set innodb_force_recovery=1 to ignore.
2022-07-18 9:51:15 0 [Note] InnoDB: Dump from the start of the mini-transaction (LSN=535340044) to 100 bytes after the record:
len 100; hex edb48c870dedb4802e0fceb409010ea7c3000c00b3000d25c3000c00a01b030b00292435336238373839392d303362392d313165642d386664362d30303530353639376263363600b01b1a002e2f504552434f4e415f534348454d412f78747261626163; asc . % )$53b87899-03b9-11ed-8fd6-00505697bc66 ./PERCONA_SCHEMA/xtrabac;
[00] 2022-07-18 09:51:15 Error: copying the log failed
[00] FATAL ERROR: 2022-07-18 09:51:15 xtrabackup_copy_logfile() failed: corrupt log.
mysql@k0008033 /xtra200/mysql/data $



 Comments   
Comment by Marko Mäkelä [ 2022-07-25 ]

mariadb-backup is only guaranteed to be compatible with the same major version of the server. There have been smaller changes to the InnoDB redo log format in 10.2, 10.3, 10.4, but a 10.4 version of backup might work with a 10.2 server.

There were major changes to the redo log format in 10.5 (MDEV-12353) and to the DDL operations in 10.6 (MDEV-25180 and many related InnoDB changes, such as MDEV-25919). There was another major change to the redo log file format in 10.8 (MDEV-14425).

The bug here is that it would be better to report a clear error message on an attempt to back up an incompatible server or prepare an incompatible backup. The minimal requirement:

  • 10.3 and 10.4 probably already refuses any newer version (needs to be tested)
  • 10.5 must refuse any other major version (older or newer; including 10.6, 10.7 where the redo log file format is the same)
  • 10.6, 10.7 must refuse anything else than 10.6, 10.7
  • 10.8 must refuse older versions (could already be the case; needs to be tested)
Generated at Thu Feb 08 10:06:10 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.