Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Aug 6 '10 at 2:35

This question came from our site for professional and enthusiast programmers.

    
@Starx: yes, so, serverfault. And you're looking for replication probably, with daily dumps on the replicating slave. –  Wrikken Aug 6 '10 at 2:30
add comment

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:

http://dev.mysql.com/doc/refman/5.1/en/backup-methods.html

share|improve this answer
add comment

Try MySQL binary logging. Back up the day's binlogs only.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.