Hi,
I am using the mod "Backup MYSQL Plugin" for the database backups that was made by DrByte.
This is a create mod, however it would be even better if it was something that could be automated.
So i am trying to make it into a script that i can cron it to run each night/week.
Here is my code so far, however when i run it does nothing. Can anyone look and see what i've done wrong?
Thanks in advance!!!PHP Code:<?php
require('includes/application_top.php');
$toolfilename = '/usr/local/bin/mysqldump';
$output = DIR_FS_ADMIN . 'backup.log';
$dump_results = DIR_FS_ADMIN . 'backup-dump.log';
$backup_file = 'db_' . DB_DATABASE . '-' . date('YmdHis') . '.sql';
$dump_params .= ' "--host=' . DB_SERVER . '"';
$dump_params .= ' "--user=' . DB_SERVER_USERNAME . '"';
$dump_params .= ' "--password=' . DB_SERVER_PASSWORD . '"';
$dump_params .= ' --opt';
$dump_params .= ' --complete-insert';
$dump_params .= ' "--result-file=' . DIR_FS_BACKUP . $backup_file . '"';
$dump_params .= ' ' . DB_DATABASE;
$dump_params .= " 2>&1";
$resultcodes = @exec(OS_DELIM . $toolfilename . $dump_params , $output, $dump_results );
@exec("exit(0)");
require('includes/application_bottom.php');
?>



