Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Latest commit

 

History

History
59 lines (40 loc) · 1.37 KB

README.md

File metadata and controls

59 lines (40 loc) · 1.37 KB

Laravel MySQL to S3 Backup

This package was rewritten and extra features added, it can be found https://github.com/ayles-software/laravel-mysql-s3-backup

This is a very simple database backup script for Laravel. It takes a mysqldump and optionally saves it to Amazon S3.

This package is very opinionated. Other backup scripts can support other database types or other places besides S3 to store your backup. This does not.

Installation

  1. Install package

    composer require parkourben99/laravel-mysql-s3-backup

    Or add it to your composer.json:

    "parkourben99/laravel-mysql-s3-backup": "1.*"
    
  2. Update your composer packages

    $ composer update
  3. Update config/app.php:

    Service Provider is autoloaded if you want to registered it manually then add

    'providers' => array(
        ...
        'LaravelMysqlS3Backup\ServiceProvider',
    ),
  4. Publish and edit the config

    $ php vendor:publish --provider=parkourben99/laravel-mysql-s3-backup

    Edit config/laravel-mysql-s3-backup.php:

    's3' => [
        'key'    => 'AMAZON_API_KEY',
        'secret' => 'AMAZON_API_SECRET',
        'bucket' => 'your-bucket-name',
    ],

Usage

$ php artisan db:backup

That's it. No arguments or optional parameters.