Mysql – What possible events could cause a MySQL database to revert to a previous state

backupfreebsdMySQL

A client of mine recently had a strange event with their MySQL database. Several days ago, one database suddenly "went back in time". All the data was in the state it was in several months ago. Even most of the .MYD and .MYI files had timestamps from November.

Fortunately, the server is not in production yet, but we need to understand how it happened so it doesn't happen again.

I'm not a MySQL guru, but I couldn't think of a scenario that could cause the database to rewind like that short of restoring from a backup. What could have happened here? Where should I look for clues?

(Server is FreeBSD 6.4)

Best Answer

Nothing showing up in the logs for the time period where the reversion was believed to have happened?

No one ran an operation that deleted records after a certain date?

Are you looking at raw data from the database or from an application that may be filtering the output so you don't see things after a certain date?

Any data restore from backup run, anyone playing with filesystem snapshots?

Any scripts running to make backups that could have hiccuped?

Who else has access to that directory with rights to copy/modify programs? You said it wasn't a production database, so are developers playing with the server, with access to version control that could have done something to the file?

Filesystem errors showing up? Was it just the database files that were affected, no other system or user data? Logfiles?

Related Topic