Great hack! *clicks install*
I modified it a tad to keep a "yesterday" and a "today". I'm sure your new version will incorporate something like this, I just couldn't wait.
PHP Code:
// move the current file so we can always keep 2 backups
print('mv ' .DUMP_PATH. '/' .DB_NAME. '-today.tar.gz ' .DUMP_PATH. '/' .DB_NAME. '-yesterday.tar.gz 2> /dev/null');
// now execute the backup
print('mysqldump --add-drop-table -h' .DB_HOST. ' -u' .DB_USER. ' -p' .DB_PASSWORD. ' ' .DB_NAME. ' 2>' .DUMP_PATH. '/' .DB_NAME. '-' .DUMP_DATE. '-error.txt >' .DUMP_PATH. '/' .DB_NAME. '-' .DUMP_DATE. '.sql');
if (DUMP_MAKE_TAR == '1')
{
// now archive and compress the backup
print('tar -cSz --remove-files -C' .DUMP_PATH. ' -f' .DUMP_PATH. '/' .DB_NAME. '-today.tar.gz ' .DB_NAME. '-' .DUMP_DATE. '.sql ' .DB_NAME. '-' .DUMP_DATE. '-error.txt');
}