dmSqlBackupPlugin allows to create SQL backups for your project.
It provides the sql_backup service, and a dm:sql-backup task.
Fully configurable and extensible with new database adapters.
Currently, only a Mysql adapter is available.
git clone git://github.com/ornicar/dmSqlBackupPlugin.git plugins/dmSqlBackupPlugin
class ProjectConfiguration extends dmProjectConfiguration { public function setup() { parent::setup(); $this->enablePlugins(array( // your enabled plugins 'dmSqlBackupPlugin' ));
php symfony dm:setup
php symfony dm:sql-backup
For example to run this task all days:
/etc/crontab
@daily www-data /usr/bin/php5 /home/my-project/symfony dm:sql-backup
$sqlBackup = $this->getService('sql_backup'); $sqlBackup->execute($connection);
$connection must be an instance of Doctrine_Connection.
Use the service container configuration file to change sql_backup parameters. It allows to configure the service, add new adapters and override the service class.
config/dm/services.yml
parameters:
sql_backup.class: dmSqlBackup
sql_backup.adapters:
mysql: dmSqlBackupAdapterMysql
sql_backup.options:
dir: SF_ROOT_DIR/data/dm/backup/sql
file_format: %%db_name%%-%%year%%_%%month%%_%%day%%_%%time%%.sql
dmSqlBackupPlugin, created on March 3, 2010 by Thibault D, used by 582 projects
Loban Amaan RahmanMarch 11, 2010 4:30 AM
I've got a couple of suggestions that would make this plugin perfect:
(1) Add a dm:sql-restore task. I guess it can take which backup to use as an argument.
(2) Add a menu item + UI in the admin panel to take, list, and restore backups.
Love the work you've done Thibault D!
tario gameOctober 10, 2011 12:42 PM
Great information. It's really useful. Thanks
wedding dressesNovember 10, 2012 12:50 AM
I like to read diem-project.org often, keep doing fine work ! [url=http://www.youtube.com/watch?v=Ceh9uYyMh2A]wedding dresses[/url]
cakes for your wedding
[url=http://www.youtube.com/watch?v=dVrUsVugglE]wedding cakes[/url]
songs for your wedding
[url=http://www.youtube.com/watch?v=qzdX-xAo61E]wedding songs[/url]
perfect bridal makeup tutorial
[url=http://www.youtube.com/watch?v=DIW1Vh4UkgU]bridal makeup[/url]
makeupNovember 14, 2012 1:22 AM
I'm glad that i found diem-project.org
[url=http://www.youtube.com/watch?v=JNwJiGp345c]makeup tutorial[/url]
[url=http://www.youtube.com/watch?v=3HbmMGaTE_A]helloween makeup tutorial[/url]
[url=http://www.youtube.com/watch?v=-CPdQHqSEjM]smokey eye tutorial[/url]
htcNovember 15, 2012 6:09 AM
Thank you very much for that big article
GarsFebruary 20, 2013 7:55 AM
Fatal error: Class 'dmContextTask' not found in C:\dev\serveranime\system\plugin
s\dmSqlBackupPlugin\lib\task\dmSqlBackupTask.class.php on line 3