For now it's a very simple bundle with a couple of classes that handles the call to the db vendor's utility that corresponds to the connection you use (for now only MySQL), using the connection's parameters. It has console commands too that uses those classes. You can simply run the backup with something like:
$factory = $container->get('backup_restore.factory'); $backupInstance = $factory->getBackupInstance('my_mysql_connection_service_id'); // This gets a Backup instance for the db platform of the connection. In this case, MySQL $pathToGeneratedSqlFile = $backupInstance->backupDatabase('/target/dir', 'optional_file_name.sql'); I was working on this for my app, but I decided to create a more generic bundle in case anyone is interested in using it (or extend it). Sadly, it hasn't a GUI because I needed only the classes that handle the work and some commands to run them. I'll upload it tomorrow to github. I didn't found a better way to handle backup / restore functionalities within PHP than executing the DB vendor's utilities (such as "mysqldump"). If anyone has a better way for backup / restore handling, please let me know. Thanks! 2011/6/22 oscar balladares <liebegr...@gmail.com> > +1 It would a very nice utility. I'm pretty sure it will catch community > attention. > > Does It will be like the admin bundle? with a GUI for such task? Does it > would have a command-line utility? > > Regards! > > 2011/6/22 Gustavo Adrian <comfortablynum...@gmail.com> > >> Hi everyone, >> >> As far as I know, the best way to backup/restore a database is using the >> utility each db vendor provides for such a task. That's why I've started to >> work today in a bundle that provides a way to execute these utilities within >> symfony's environment. I had it working some time ago, but only for MySQL. >> Now I want to create a bundle with the possibility of adding the needed >> classes to handle other vendor's utilities. It's a simple bundle with some >> classes responsibles of doing the backup / restore using the information of >> some Doctrine's connection. It provides Commands for backup and restore too. >> For now I'll only implement classes to handle MySQL's "mysqldump". I need >> support for MongoDB too, but I still don't know much about how to do a >> backup / restore with this db so I'll have to read a little bit about it >> first. >> >> I guess I'll be uploading this bundle tomorrow at work, but in the >> meantime I'd like to know if anyone is working on something like this. If >> not, any comments about this topic will be very appreciated. >> >> >> >> Thanks in advance! >> >> -- >> If you want to report a vulnerability issue on symfony, please send it to >> security at symfony-project.com >> >> You received this message because you are subscribed to the Google >> Groups "symfony users" group. >> To post to this group, send email to symfony-users@googlegroups.com >> To unsubscribe from this group, send email to >> symfony-users+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/symfony-users?hl=en >> > > -- > If you want to report a vulnerability issue on symfony, please send it to > security at symfony-project.com > > You received this message because you are subscribed to the Google > Groups "symfony users" group. > To post to this group, send email to symfony-users@googlegroups.com > To unsubscribe from this group, send email to > symfony-users+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/symfony-users?hl=en > -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en