[MDEV-27532] mariabackup: prepare with different version does not work, "Upgrade after a crash is not supported" Created: 2022-01-18  Updated: 2022-01-27  Resolved: 2022-01-18

Status: Closed
Project: MariaDB Server
Component/s: mariabackup
Affects Version/s: 10.4.22
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Allen Lee (Inactive) Assignee: Vladislav Vaintroub
Resolution: Not a Bug Votes: 1
Labels: None


 Description   

There is issue where user tries to run --prepare on different version of mariadb server.
Here is what user did.

1. Total 5 TB database size.
2. We are taking the compressed backup with mariadb 10.4.22 and then we are copying this backup file to other server(mariadb v10.5.13), so the copy will be on time and so quick to copy the compressed file instead of uncompressed file.
3. run --prepare on mariadb v10.5.13, then hit the following error.

[root@test301]# /usr/bin/mariabackup --prepare --target-dir=/db/backup/full_backup_01172021
/usr/bin/mariabackup based on MariaDB server 10.5.13-9-MariaDB Linux (x86_64)
[00] 2022-01-16 21:45:42 cd to /db/backup/full_backup_01172021/
[00] 2022-01-16 21:45:42 open files limit requested 0, set to 1024
[00] 2022-01-16 21:45:44 This target seems to be not prepared yet.
[00] 2022-01-16 21:45:44 mariabackup: using the following InnoDB configuration for recovery:
[00] 2022-01-16 21:45:44 innodb_data_home_dir = .
[00] 2022-01-16 21:45:44 innodb_data_file_path = ibdata1:12M:autoextend
[00] 2022-01-16 21:45:44 innodb_log_group_home_dir = .
[00] 2022-01-16 21:45:44 InnoDB: Using Linux native AIO
[00] 2022-01-16 21:45:44 Starting InnoDB instance for recovery.
[00] 2022-01-16 21:45:44 mariabackup: Using 104857600 bytes for buffer pool (set by --use-memory parameter)
2022-01-16 21:45:44 0 [Note] InnoDB: Uses event mutexes
2022-01-16 21:45:44 0 [Note] InnoDB: Compressed tables use zlib 1.2.7
2022-01-16 21:45:44 0 [Note] InnoDB: Number of pools: 1
2022-01-16 21:45:44 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2022-01-16 21:45:44 0 [Note] InnoDB: Using Linux native AIO
2022-01-16 21:45:44 0 [Note] InnoDB: Initializing buffer pool, total size = 104857600, chunk size = 104857600
2022-01-16 21:45:44 0 [Note] InnoDB: Completed initialization of buffer pool
2022-01-16 21:45:44 0 [ERROR] InnoDB: Upgrade after a crash is not supported. The redo log was created with Backup 10.4.22-14-MariaDB.
2022-01-16 21:45:44 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
[00] FATAL ERROR: 2022-01-16 21:45:44 mariabackup: innodb_init() returned 11 (Generic error).



 Comments   
Comment by Vladislav Vaintroub [ 2022-01-18 ]

It is not generally possible to upgrade by taking backup in one version and restoring in another version. versions of "mariabackup --backup" and "mariabackup --prepare" have to match, ideally completely, in all 3 components of major.minor.tiny . It is so, because --prepare works like recovery after a crash, technically, so it has the same limitations as the server.

Generated at Thu Feb 08 09:53:37 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.