Possible MySQL database data loss

S Mahdi Seifollahi 0 Reputation points
2024-10-01T10:11:15.0566667+00:00

Hello,

We noticed some of our records in the database are missing.

We send SMS thourgh our backend and keep the logs in the database. We noticed some people have received our SMS but I don't see any records in the database for them. It is not possible to send SMS without logging into the database.

I checked the SMS panel and exported the excel file and compared with my database. I noticed we have lots of records missing.

The SMS has surely been sent through our system. I repeat, It is not possible to send SMS without logging into the database.

It seems like the system has sent the SMS, we logged it into the database, but somehow it is removed.

Is it possible that somehow automatically, Azure reverted or restored back the changes in the database to an older state? This has happened in several dates.

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
829 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sai Raghunadh M 555 Reputation points Microsoft Vendor
    2024-10-01T18:59:24.9466667+00:00

    Hi @S Mahdi Seifollahi,

    Thanks for the question and using MS Q&A platform.

    I understand that you are facing issue with missing records in your Database.

    • First, check if you have transaction management set up. If SMS logs are part of transactions that aren’t properly committed, they won’t be saved. Look over the code that handles logging to make sure commits are working.
    • Next, see if any auditing or monitoring tools are active. Azure has tools like Azure Monitor and Activity Log that can show when changes were made and why.
    • Remember, Azure Database for MySQL allows you to roll back to a previous state using point-in-time restore. Be careful with this feature, as an accidental restore could lose recent data. Check the activity logs in the Azure portal to see if any restores have happened.
    • Also, some systems automatically delete old records after a certain time. Make sure there aren’t any policies like this that might affect your logs.
    • If multiple instances of your application are running, ensure they’re handling concurrent writes correctly to avoid overwriting or deleting records. Review how you manage this.

    Finally, ask your team if anyone has restored a backup that didn’t include the latest SMS logs, as this could cause discrepancies in your data.

    Hope this helps. Do let us know if you have any further queries. If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

     

     


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.