[eluser]cahva[/eluser]
Well if your database is 16M and your memory_limit is 16M you definately wont be backing it up with CI's own backup. Backup takes eats atleast the 16M and you have to also count all the INSERT and other text that comes with it + memory taken by CI with loaded libs etc. Memory usage will most probably almost double if you gzip it also.
Generally its better and faster to use mysqldump either from shell or if your host have disable shell but you are enable to run mysqldump from php with exec commands.
For example if you are not limited by safe mode and you can use shell command mysqldump, backup of database is simple as this:
Code:
exec('mysqldump -u [user] -p[password] dbname > dump.sql');
..or with safe mode set to on you can try this althought memory_limit can also be issue in this because the dump is dumped to variable:
Code:
ob_start();
passthru('mysqldump -u [user] -p[password] dbname');
$out = ob_get_clean();
$fp = fopen('dump.sql','w');
fwrite($fp,$out);