You can dump all databii with "mysqldump --all-databases", however, you might find it more convenient to have a separate mysqldump file for each database. You can script that manually, however, it's a bit nicer if you use a utility to discover all databases, and rotate the mysqldump files so that you always have a previous mysqldump file that is static while creating a new set of dump files on a rotating basis (though proper selection of backup windows will reduce the chances of the mysqldump and disksync overlapping).
This is one area where MySQL shows a weakness compared to higher end database systems such as Oracle. Oracle has a "hot backup mode" which provides for virtual quiescence of the data, capturing transactions during the backup window to the log files, and automatically replaying the log files at the conclusion of the backup window. I haven't read the specs on the DiskSync Oracle agent, however, my guess is that it uses this capability. I wouold expect that MySQL will eventually have something similar to Oracle online backup.
I use the following perl script to drive a MySQL dump for each database on my system, and rotate a new copy each day fo the week.
CODE
#!/usr/bin/perl
use DBI;
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime();
print "Backup start: $hour:$min:$sec $mon/$mday/$year\n";
$dir="/drv3/sql_backup/day_$wday";
eval
{
$dbh=DBI->connect("DBI:mysql:mysql:localhost","root","rootpassword",{ RaiseError=>1});
$sth=$dbh->prepare("SHOW databases");
$sth->execute;
$sth->bind_columns(\($database));
while($sth->fetch)
{
$cmd="mysqldump $database > $dir/$database.sql";
print "DIR=$dir CMD=$cmd\n";
if ( ! -f $dir )
{
mkdir($dir);
}
system($cmd);
}
$dbh->disconnect();
};
if($@)
{
print "Database errro $@\n";
}
print "Backup end: $hour:$min:$sec $mon/$mday/$year\n";