Newsletters older than 6 months may have links that are out of date. Please use the Search to check for updated links.
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.