With MySQL, it is relatively easy to create “point in time” restores. All you need is recent(ish) backup and a bunch of saved binary logs. You can restore the backup you have, and when it is completed, you can use mysqlbinlog utility to apply your saved binary logs to the desired state of your database.
I have created a simple go application to make your life easier. You can find it on my GitHub page.
The app works as reading its config file for the MySQL server connection credentials, a local directory where the binary logs will be kept, and the will path of the mysqlbinlog utility.
- It checks the binlogs on the remote server which able to streamed
- Checks the local directory where the binlogs are kept, to check which logs are already there
- The incomplete (file size differs local and on remote server) files will be …