PHPackages                             monashee/backup - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. monashee/backup

ActiveLibrary[File &amp; Storage](/categories/file-storage)

monashee/backup
===============

Laravel MySQL backup utility and upload to AWS S3.

1192PHP

Since Sep 30Pushed 11y ago1 watchersCompare

[ Source](https://github.com/DerekMarcinyshyn/monashee-backup)[ Packagist](https://packagist.org/packages/monashee/backup)[ RSS](/packages/monashee-backup/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Monashee Backup
===============

[](#monashee-backup)

[![Build Status](https://camo.githubusercontent.com/6ebde3a235a5817fad1a101767147cff09638a21a9f000b38e7511746500a2d8/68747470733a2f2f7472617669732d63692e6f72672f446572656b4d617263696e797368796e2f6d6f6e61736865652d6261636b75702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/DerekMarcinyshyn/monashee-backup)

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.

### Events

[](#events)

`MonasheeBackupSuccess` fires on completion and passes the $databases array

`MonasheeBackupFail` fires on Exception and passes the $e-&gt;getTraceAsString()

Installation
------------

[](#installation)

Requires

- PHP 5.4+
- Laravel 4.2+

Install via Composer by adding the following line to the require block of your composer.json file

```
"monashee/backup": "dev-master"
```

Then run `composer update`

Add this line to the providers array in your `app/config/app.php` file:

```
'Monashee\Backup\BackupServiceProvider',
```

Configuration
-------------

[](#configuration)

Create or edit your `.env.php` file in your root directory. Copy the config settings and edit the fields.

```
