I tried to restore an old raw backup of databases (whole datadir) in MariaDB 10.11.5 but it didn't booted up. After that I found following lines in log:
[ERROR] InnoDB: File ./ib_logfile0 was not found
[ERROR] InnoDB: Plugin initialization aborted with error Generic error
[Note] InnoDB: Starting shutdown...
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[Note] Plugin 'FEEDBACK' is disabled.
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting
For over a decade I've been deleting log files on MySQL and MariaDB servers to adjust innodb-log-file-size
or for making a raw backups and saving space. The next time the server was restarted, they were recreated automatically. But suddenly, not this time.
And all because starting with version MariaDB 10.8.1, the presence of a ib_logfile0
became mandatory due to multiple changes (MDEV-27199) and (MDEV-14425). It's no longer automatically created, but strictly required.
I tried creating an empty log file, but that apparently didn't work and resulted in an error:
[ERROR] InnoDB: ib_logfile0 is empty, and LSN is unknown.
[ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
After studying the tasks on jira, I got the strong feeling that there was no way to "regenerate" the log file as before. So, my main question is: is there any other ways out rather than restoring a backups on an older MariaDB version and backuping them properly for newer ones?
And what about creation of such "raw" backups on the newer versions? I've read that instead of deleting the log, you now must reduce the size of the log to save disk space. Probably, now it's the only way?
P.S It's very worth noting that starting from version 10.8.1 the log file size changes automatically when you change it in the configuration. And starting from version 10.9.0 - even at runtime (MDEV-27812).