dizda / CloudBackupBundle

Be able to backup your database(s) and upload it to the cloud (Dropbox, Amazon S3, GoogleDrive, etc.)
MIT License
196 stars 57 forks source link

Run from a Symfony Controller #121

Closed florianrusch closed 7 years ago

florianrusch commented 7 years ago

Hi,

is it possible to run a backup from an action in a symfony controller?

I'm trying to implement a backup service which will be called via rest from a management system. This service should start a backup process immediately.

jongotlin commented 7 years ago

If your database is pretty small you can run the backup from a controller with $this->get('dizda.cloudbackup.manager.backup')->execute(). But a better solution (and necessary if your db is big) is to execute the backup command from a background process. Personally I would use https://github.com/bernardphp/bernard for such thing.

florianrusch commented 7 years ago

Thank you! I will take a look. ;-)