--innodb-force-recovery
This page is part of MariaDB's Documentation.
The parent of this page is: mariadb-backup
& mariabackup
Topics on this page:
Overview
This is a command-line option for the mariadb-backup
& mariabackup
commands (arg: Optional).
(for --prepare): Crash recovery mode (ignores page corruption; for emergencies only).
See also: Options for mariadb-backup & mariabackup in MariaDB Enterprise Server 11.4, in 10.6 ES, in 10.5 ES, in 10.4 ES, in 10.3 ES, in 10.2 ES, in 10.6 CS, in 10.5 CS, in 10.4 CS, in 10.3 CS, and in 10.2 CS
DETAILS
The default value of 0
means that InnoDB is running normally. The other values are for modes that are used for recovery purposes only and no data can be changed while a mode other than 0
is active.
The recovery mode behavior depends on the MariaDB server version, see the tables below for details.
In MariaDB 10.5 and later: Write transactions are permitted with
innodb_force_recovery<=4
In MariaDB 10.4 and earlier: Write transactions are permitted with
innodb_force_recovery<=3
Regardless of the version of the MariaDB server, the values 5
and 6
can lead to data corruption and should be used very carefully and only if you have a database backup.
Mode | Description |
---|---|
| The default mode while InnoDB is running normally. |
| Allows the server to keep running even if corrupt pages are detected. It does so by making redo log based recovery ignore certain errors, such as missing data files or corrupted data pages. Any redo log for affected files or pages will be skipped. You can facilitate dumping tables by getting the |
| Stops the master thread from running, preventing a crash that occurs during a purge. No purge will be performed, so the undo logs will keep growing (internal name |
| Does not roll back transactions after the crash recovery. Does not affect rollback of currently active transactions, also prevents some undo-generating background tasks from running. These tasks could hit a lock wait due to the recovered incomplete transactions whose rollback is being prevented (internal name |
| Does not calculate tables statistics and prevents insert buffer merges (internal name
|
| Treats incomplete transactions as committed, and does not look at the undo logs when starting (internal name
|
| Does not perform redo log roll-forward as part of recovery. Running queries that require indexes are likely to fail with this mode active. However, if a table dump still causes a crash, you can try using a |
CHANGE HISTORY
Release Series | History |
---|---|
11.4 Enterprise |
|
10.6 Enterprise |
|
10.6 Community |
|
10.5 Enterprise |
|
10.5 Community |
|
10.4 Enterprise |
|
10.4 Community |
|
10.3 Enterprise |
|
10.3 Community |
|
10.2 Enterprise |
|
10.2 Community |
|