Scanman, great work and I needed a script like this to email me my backups. I did have one that would archive them locally (Thanks to Lupus!), but this script is a definate must have. Although I did run into a problem using the email script. Trying to gzip all databases using --all-databases or -A doesn't work on Lunarpages?
Not sure why, but --all-databases won't work for me, although commenting out this line:
$dbname = ""; // Database name. Use --all-databases if you have more than one
And using this in $command works fine:
$command = "mysqldump -u $dbuser --password=$dbpwd --databases database1 database2 database3 | gzip > $filename";
Any reason why --all-databases won't work?