some Records are deleted from two tables ...which way is best to restore these deletes records?

Hello I'v got a "simple" DBA end-user question

I have a simple two table database. We have had 1115/1135 records in there. Suddently there have been only 75 records (newly created records) left on the database. These older entries have gone ... We do not know how this gonna happens and when. Magic ...or wrong manipulation by one of our application end-user ... Fact now is, how can I restore these deleted records again in my database without loosing these newer entries?

Best will be I guess ...Please correct or advice, with commands in sequence to get the database fully populated with these 1115/1135 and 75 records to have full database back.

1: Backup these 75 records as Full Backup. Then do also an EXTRACT for these two tables (Table1_data-dump.sq, Table2_data-dump.sq) to have these extracted Tables to be restored afterwards as INSERT ... 2: Then do a full restore to the date as the database was in good known state containing these 1115/1135 records. 3: Afterwards Insert these EXTRACT for these 75 records on two tables (Table1_data-dump.sq, Table2_data-dump.sql) ...

Is this the best way? What can you recommend? Please advice Thanks a lot for your assistance and advice Urs

Answer Answered by Ian Gilfillan in this comment.

Do you have the binary log enabled? See this answer for details.

You probably don't have it enabled, but this is something that system-versioned-tables would be ideal for. You could just query the table at the point in time before the records were deleted.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.