Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is probably bordering on a silly question, but if I recently restored a Full mysql DB dump via cat dump.mysql |mysql dbname to a new instance of mysql in order to migrate; and I want to restore the last incremental dump that contains the newest data since that full dump, can I just import that dump the same way into my db and it will just add to it without overwriting the other data (unless the data was modified in which case it should overwrite)?

share|improve this question
What did you use to make the incrementals? – ceejayoz Feb 25 '13 at 23:34
I haven't made the incrementals yet. I am using mysqldump to create the dumps. I am looking for a way to migrate a lamp server to a new box without disabling write access to the database during the migration, so that I can just create an incremental backup of all the databases and import them right before we switch over to the new server for minimal downtime. – user160910 Feb 26 '13 at 13:29
No need to do that, just replicate from the current one to the new one. – ceejayoz Feb 26 '13 at 14:44
Replication is exactly the way to go – kormoc Feb 26 '13 at 22:43

Database restores are a fair amount more complicated than standard filesystem backups.

To have the ability to do incremental point-in-time restores, you will have typically needed to set up periodic full backups (mysqldump or the like) in combination with binary logging. To perform an "incremental" restore, you'd restore the last full backup and then re-play the binary logs starting with the log file and log position the last full was taken at.

If you do have binary logs in place, then you can use those to perform the incremental restore. If not, it's unlikely that you'll be able to restore your data into a consistent state.

share|improve this answer
He could be using Innodb Hot Backup or XtraBackup or other tools to be doing binary incremental backups. Binary logs are not the only way to skin this cat. – kormoc Feb 26 '13 at 2:53
@kormoc - yes, that's a possibility. If the OP had the foresight to choose one of those options, though, it's highly likely he wouldn't be asking here how to do a restore. – EEAA Feb 26 '13 at 3:29
He did specifically say he had incremental backups, so one would assume he created them with some utility – kormoc Feb 26 '13 at 3:48

Your Answer


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