You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to recover a corrupted ARCHIVE table, my searching lead me here. Posting my findings in case it also helps someone in the future. (Note that archive_reader is not specific to this fork - this fork is just where I was lead.)
Shutdown MySQL/MariaDB server (should work with either; I do not think anyone has worked on the ARCHIVE engine for over a decade).
Backup your mysql data dir in case something goes wrong.
Rebuild the <table-name>.ARZ with archive_reader --backup path/to/table.ARZ new-file.ARZ.
Replace <table-name>.ARZ with the new file.
If <table-name>.ARN exists, delete it.
Start up the db server.
Before doing anything else, mysqldump the table.
The server thinks the table is valid, so even if corruption was not repaired, you should still be able to dump data up to the point where it had an issue. Can load this dump later, if need be.
If there were no errors, hopefully everything is good to go.
We found ARCHIVE engine to be 6x smaller than compressed InnoDB (and 10x smaller than uncompressed), so still has value. If you too must stay with ARCHIVE, I recommend FLUSHing the table after completing any major write.
The text was updated successfully, but these errors were encountered:
While trying to recover a corrupted ARCHIVE table, my searching lead me here. Posting my findings in case it also helps someone in the future. (Note that
archive_reader
is not specific to this fork - this fork is just where I was lead.)Patched code with:
cmake && make archive_reader -j4
.<table-name>.ARZ
witharchive_reader --backup path/to/table.ARZ new-file.ARZ
.<table-name>.ARZ
with the new file.<table-name>.ARN
exists, delete it.mysqldump
the table.We found ARCHIVE engine to be 6x smaller than compressed InnoDB (and 10x smaller than uncompressed), so still has value. If you too must stay with ARCHIVE, I recommend
FLUSH
ing the table after completing any major write.The text was updated successfully, but these errors were encountered: