MySQL Restore from a Year Old Backup

backupMySQLrestore

I have two backups created via mysqlhotcopy:

  1. backup-before-deletion from August 7, 2014 and
  2. backup-after-deletion from February 3, 2016

A deletion event occurred on July 17, 2015 which resulted in the deletion of about 15,000 rows across 7 different tables.

Because this segment of data was hardly ever touched it wasn't noticed until a recent audit.

The good news is the deletion event can be simulated but it would have to be done on the backup-before-deletion.

What is the most cost effective way (paid for tools are on the table) to restore the deleted data?

Best Answer

Consider

  1. Load the data into a different database, or even a different MySQL instance.
  2. Locate the deleted rows.
  3. Export them in some manner -- INSERT .. SELECT .. into another table; SELECT INTO OUTFILE ..., mysqldump, etc.
  4. Load them into your real database.

Cost: A bunch of your time.