Imagine, I am building a web application of a Bank. Therefore I need to backup the database at least once a day and to backup the whole database everyday does not sound efficient. So I want to know how to create the backup file of the database only holding the transactions of current day.
2 Answers
Make Incremental Backups by Enabling the Binary Log.
MySQL supports incremental backups: You must start the server with the --log-bin option to enable binary logging; see Section 5.2.4, “The Binary Log”. The binary log files provide you with the information you need to replicate changes to the database that are made subsequent to the point at which you performed a backup. At the moment you want to make an incremental backup (containing all changes that happened since the last full or incremental backup), you should rotate the binary log by using FLUSH LOGS.
More on: