Provide a simple Symfony 2 Bundle to backup database via one command.
{
"require": {
"dlevacher/backup-bundle": "dev-master"
}
}
public function registerBundles() {
$bundles = array(
new Dlevacher\BackupBundle()
);
}
To provide custom backup dir. Add a config options in your config.yml, like:
dlevacher_backup:
dir: "%kernel.root_dir%/backup"
Then to access this setup call:
$this->get('dlevacher_backup.dir');