I wrote a little utility in C that scans over an innodb file checking all the checksums. I just plagiarized the code from the sources that computes checksums. I love this utility. I run it over all our backups after they are freshly made to gain confidence in them.
Recently we created a new "warehouse" db that's using myisam exclusively. I was wondering if myisamchk could detect the aftermath of a head placement fault. I made a copy of the .frm, .MYI, and .MYD files for a large table, and wrote a little C program that would go in and copy 512-bytes from one place to another in a file. I ran "myisamchk --check" over differently corrupted versions of the .MYI and .MYI files, and it successfully detected a problem every time. I was pleased that "myisamchk --check" was able to do the job rather than having to resort to "myisamchk --extend-check", which is several times slower. I'll be using myisamchk to verify our backups.
No comments:
Post a Comment