0
I know I can do a backup and revert it, but the goal is to use it for debug. I work with Drupal and often I have to debug code that will create/delete/edit data in the database, and then I have to undo what I did before I can debug it again.
To use that for debugging, I would like to snapshot and revert it fast. I read about Incremental Backup and something like that could work if I could create a incremental backup from a point (without a full backup) and then somehow revert that incremental backup later.
Another option would be to custom log all sql transactions with mysql triggers and revert it back later, but that would be prone to errors and would take a lot of time to develop.
1I take a simplistic approach and dump the database using HeidiSQL or phpMyAdmin and simply restore it entirely while doing development. The same could be done using tools provided with MySQL and MariaDB. If the database is too big I'll do it on a table level. – Dave – 2019-04-18T15:37:38.947
@Dave Thats what I'm trying to avoid, database is too big and I don't always know the tables that will have changes. – Mete – 2019-04-18T16:02:37.360
If you're working on the code how can you not know what tables are involved? I must be missing something in your question if that is the case. – Dave – 2019-04-18T16:26:05.440
@Dave as I said, I work with Drupal, once I save a node for example, it can easily go over 100 tables, I don't want to have to track and backup all these tables. – Mete – 2019-04-18T18:01:42.597
Oh, Drupal, enough said (shudder) :) – Dave – 2019-04-18T18:10:03.580