A simple Laravel artisan utility to backup MySQL database to AWS S3 bucket.
I use it by creating a backup mysql user and attaching that user to all of the databases I want to backup. In a multi database environment it makes it easier to only select those databases that are in production.
It saves to a temp folder then after uploading to AWS S3 it removes the $database.sql.gz files.
It also cleans up the S3 folder by removing daily backups from 2 months ago but leaving the first one of the month.
MonasheeBackupSuccess fires on completion and passes the $databases array
MonasheeBackupFail fires on Exception and passes the $e->getTraceAsString()
Install via Composer by adding the following line to the require block of your composer.json file
Then run composer update
Add this line to the providers array in your app/config/app.php file:
Create or edit your .env.php file in your root directory. Copy the config settings and edit the fields.
mysqldump requires at least the SELECT privilege for dumped tables, SHOW VIEW for dumped views, TRIGGER for dumped triggers, and LOCK TABLES if the --single-transaction option is not used. Certain options might require other privileges as noted in the option descriptions.
To reload a dump file, you must have the same privileges needed to create each of the dumped objects by issuing CREATE statements manually.
\Monashee\Backup\Dump.php has the mysqldump options