mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 02:51:44 +01:00
5bc5ecce08
During the prepare phase of restoring backups, "mariabackup" does not seem to allow (or recognize) the option "innodb_force_recovery" for the embedded InnoDB server instance that it starts. If page corruption observed during page recovery, the prepare step fails. While this is indeed the correct behavior ideally, allowing this option to be set in case of emergencies might be useful when the current backup is the only copy available. Some error messages during "--prepare" suggest to set "innodb_force_recovery" to 1: [ERROR] InnoDB: Set innodb_force_recovery=1 to ignore corruption. For backwards compatibility, "mariabackup --innobackupex --apply-log" should also have this option. Signed-off-by: Srinidhi Kaushik <shrinidhi.kaushik@gmail.com>
26 lines
1.3 KiB
Text
26 lines
1.3 KiB
Text
CREATE TABLE t(i INT) ENGINE INNODB;
|
|
INSERT INTO t VALUES(1);
|
|
# "innodb_force_recovery=1" should be allowed with "--prepare" only (mariabackup)
|
|
FOUND 1 /should only be used with "--prepare"/ in backup.log
|
|
# "innodb_force_recovery=1" should be allowed with "--apply-log" only (innobackupex)
|
|
FOUND 1 /should only be used with "--apply-log"/ in backup.log
|
|
# "innodb_force_recovery" should be limited to "SRV_FORCE_IGNORE_CORRUPT" (mariabackup)
|
|
FOUND 1 /innodb_force_recovery = 1/ in backup.log
|
|
# "innodb_force_recovery" should be limited to "SRV_FORCE_IGNORE_CORRUPT" (innobackupex)
|
|
FOUND 1 /innodb_force_recovery = 1/ in backup.log
|
|
# "innodb_force_recovery" should be read from "backup-my.cnf" (mariabackup)
|
|
FOUND 1 /innodb_force_recovery = 1/ in backup.log
|
|
# "innodb_force_recovery=1" should be read from "backup-my.cnf" (innobackupex)
|
|
FOUND 1 /innodb_force_recovery = 1/ in backup.log
|
|
# "innodb_force_recovery" from the command line should override "backup-my.cnf" (mariabackup)
|
|
NOT FOUND /innodb_force_recovery = 1/ in backup.log
|
|
# "innodb_force_recovery" from the command line should override "backup-my.cnf" (innobackupex)
|
|
NOT FOUND /innodb_force_recovery = 1/ in backup.log
|
|
# shutdown server
|
|
# remove datadir
|
|
# xtrabackup move back
|
|
# restart server
|
|
SELECT * FROM t;
|
|
i
|
|
1
|
|
DROP TABLE t;
|