Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I do backups in MySQL? [duplicate]

Tags:

mysql

backup

How do I do backups in MySQL?

I'm hoping there'll be something better than just running mysqldump every "x" hours.

Is there anything like SQL Server has, where you can take a full backup each day, and then incrementals every hour, so if your DB dies you can restore up to the latest backup?

Something like the DB log, where as long as the log doesn't die, you can restore up to the exact point where the DB died?

Also, how do these things affect locking? I'd expect the online transactions to be locked for a while if I do a mysqldump.

like image 268
Daniel Magliola Avatar asked Sep 05 '08 18:09

Daniel Magliola


People also ask

How do I backup multiple MySQL databases?

To backup multiple MySQL databases with one command you need to use the --database option followed by the list of databases you want to backup. Each database name must be separated by space. The command above will create a dump file containing both databases.


1 Answers

You might want to look at incremental backups.

like image 134
Kyle Cronin Avatar answered Sep 18 '22 23:09

Kyle Cronin