[eluser]gtech[/eluser]
reading the code a bit more if the format is txt, all that dbutil->backup($prefs); returns is a string.. you could echo that string to see if you are getting anything back
Code:
$prefs = array(
'format' => 'txt', // gzip, zip, txt
);
echo $this-CI->dbutil->backup($prefs);
if you are then the problem is with the write_file, you could do a check to see if you have write permissions to the folder..
The problem is the backup code does not appear to log anything so you will not see any error message, so its worth doing the check.
you could also check write_file as follows
Code:
...
$this->CI->load->helper('file');
$data = 'Some file data';
$filename='backup/db.'.date("YmdHi").'.txt';
if ( ! write_file($filename, $data))
{
echo 'Unable to write the file';
}
else
{
echo 'File written!';
}