Welcome Guest, Not a member yet? Register   Sign In
Database Backup Utility
#3

[eluser]samseko[/eluser]
[quote author="cahva" date="1224553790"]
Code:
ob_start();
passthru('mysqldump -u [user] -p[password] dbname');
$out = ob_get_clean();
$fp = fopen('dump.sql','w');
fwrite($fp,$out);
[/quote]

Thanks cahva - this got me out of a mess.. to make download prompt the result in gz format:
Code:
$date = date("Y-m-d");
$name = $date.'-sitename.gz';
$this->load->helper('download');
force_download($name, gzencode($out));
hope that is of use to others, too.
cheers


Messages In This Thread
Database Backup Utility - by El Forum - 10-20-2008, 12:38 PM
Database Backup Utility - by El Forum - 10-20-2008, 02:49 PM
Database Backup Utility - by El Forum - 12-12-2009, 06:37 PM
Database Backup Utility - by El Forum - 12-12-2009, 10:02 PM



Theme © iAndrew 2016 - Forum software by © MyBB