USA - Toll Free: +1-866-221-0634
USA - From abroad: +1-408-701-9009
USA - Subscription Renewals: +1-866-830-4410
Latin America: +1 512 535 7751
UK: +44 845 399 1124
Ireland: +353 1 6919191
Germany: +49 89 420 95 98 95
France: +33 1 70 38 72 00
Sweden: +46 730 207 871
Benelux: +358 50 5710 528
Italy: +39 06-99268193
Israel: +358 50 5710 528
Spain & Portugal: + 34 933905461
Other EMEA countries: +353 1 6919191
Asia Pacific: +81 3 5918 7507
Learn about new MySQL releases, technical articles, events and more.
Currently MySQL does not provide API for doing hot backup, but we provide some interim tools, that can be used to get same functionality.
For total hot backup you can use the mysqldump program, which writes its output to stdout, and that output can be captured (optionally through gzip process) and streamed out to tape or disk for storage.
For incremental hot backup you can use our binary logs. (If MySQL is not doing binary logging, this is easily fixed by adding a simple configuration option.)
For the incremental backup we have utility, which is called mysqlbinlog. It reads logs and outputs the content out to stdout. Mysqlbinlog has options for file offset and positions. With this tool it is easy to do incremental hot backup. All you have to do is simply remember the last position (of logfile) on the next backup session and start backup from the last position reached in previous backup. Because our binary logs work in such a way, that a new file is created after certain (configurable) filesize limit is reached. So you should also remember the last file's name that you have read from. This is because when new file is created, our new binary log file only gets new extension. They go like this:
hostname.001
hostname.002
hostname.003
hostname.004
.....
hostname.NNN
So, you should remember last used file and position. Thereafter it is quite easy.
