Is there a way to set a MySQL database back to everything it had in it a moment before something was changed? Say, 25 minutes ago?

7 Answers

Relevance
  • 1 month ago

    Yes, you load the backup that you did 30 minutes ago, otherwise, no.

  • Anonymous
    1 month ago

    Alas, you have to arrange that ahead of time, before the event. You will need a snapshot of the database at a point in time, and a log of all the changes that were made after that so it can be played back to re-create the current state. Find out if your database has that kind of backup and logging set up.

  • 1 month ago

    No, that's the reason we take backups.

  • 1 month ago

    Doesn't look like it.

    Some DBMS log transactions and have the ability to "undo" transactions. 

    I'm not familiar with MySQL, so I had to do a very quick web search. As far as I can tell, MySQL does not seem to have that feature. 

    Even if it did have that feature, there would be a limit on how far back you can go.

    Edit: 

    I heard about a company who designed that feature in their software:  Before running a month close out, they would back up their database. When the month close out finished, they'd make another backup. All the transactions to the database were logged. The logs included the date and time of transactions.

    They could "undo" back to any point up to the beginning of the month. If they needed an "undo", they would restore the backup made after the month close out. Except the restore would not affect the log files. Their software would then use the log files to rerun transactions from the beginning of the month  up to, but not including, the time the mistake was made.

  • What do you think of the answers? You can sign in to give your opinion on the answer.
  • Lv 7
    2 months ago

    noep.

    this is why we schedule regular backups, and use Transactions to verify things.

    and ALWAYS backup before making any major changes. to both database AND website(s).

    our company backs up 2x daily. one in the morning, and one midday.

  • P
    Lv 7
    2 months ago

    The short answer is no, unless you setup automated SQL backups to run every 30 minutes, however the fact you are asking probably means you did not.  

  • Anonymous
    2 months ago

    Is it backed up?

Still have questions? Get answers by asking now.