User Functions


There are no upcoming events

What's New

Stories last 2 weeks

No new stories

Comments last 2 weeks

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

Downloads last 2 weeks

Welcome to Geeklog Sunday, February 14 2016 @ 01:46 PM EST

How does Geeklog backup the database?

When clicking on the database backup link from the Admin menu, the following command is issued.

/usr/bin/mysqldump -hlocalhost -udbuser -pdbpassword -Q

localhost, dbuser, dbpassword and -Q are derived from your config.php

$_DB_host = 'localhost';
$_DB_user = 'dbuser';
$_DB_pass = 'dbpasssword';
$_CONF['mysqldump_options'] = '-Q';

So in your instance you would change those arguments to what your config.php says. The host is probably still localhost, but your dbuser and dbpassword will be different.

Also the command /usr/bin/mysqldump is derived from config.php. $_DB_mysqldump_path = '/usr/bin/mysqldump';

If you have phpMyAdmin with your server you can do a manual backup.

For an automatic solution using a cronjob, see this story: Backing Up Geeklog. This is also what we're using to backup the database.


mysqldump is an external application and on some setups, it's not possible to execute external applications from PHP scripts, e.g. when safe_mode=on, when open basedir restrictions are in effect and the path where mysqldump is located is not one of the allowed paths, or when your hosting service has disabled the PHP exec command.

All of the above are server-side settings, so try asking your hosting service for help (or change them yourself if it's your own server).

FAQ Manager » Usage » How does Geeklog backup the database?