29/07
2016
Wallogit.com
2017 © Pedro Peláez
Lets make a backup of the database
Provide a simple Symfony 2 Bundle to backup database via one command., (*1)
{
"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:, (*2)
dlevacher_backup:
dir: "%kernel.root_dir%/backup"
Then to access this setup call:, (*3)
$this->get('dlevacher_backup.dir');