New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

ayles-software/laravel-mysql-s3-backup

Backup the MySQL database of your Laravel app to Amazon S3
27,617 5
Install
composer require ayles-software/laravel-mysql-s3-backup
Latest Version:4.10.0
PHP:^8.3
Laravel:9 – 13
Older releases:5 – 8
Last Updated:Feb 27, 2026
Links: GitHub  ·  Packagist
Maintainer: parkourben99

Laravel MySQL to S3 Backup

This is a very simple database backup script for Laravel. It takes a mysqldump and saves it to Amazon S3 or compatible object storage. It also supports trimming backups to only have X days worth on 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 ayles-software/laravel-mysql-s3-backup
    
  2. Publish and edit the config

    php artisan vendor:publish --provider="LaravelMysqlS3Backup\ServiceProvider"
    

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

    's3' => [
        'key'    => 'AMAZON_API_KEY',
        'secret' => 'AMAZON_API_SECRET',
        'bucket' => 'your-bucket-name',
        'region' => 'your-bucket-region',
        'endpoint' => env('AWS_ENDPOINT'),
        'folder' => env('BACKUP_FOLDER'),
    ],
    

Usage

$ php artisan db:backup

That's it. No arguments or optional parameters.

Credit

This package was originally forked from fitztrev before a complete rewrite.

License

Laravel MySQL to S3 Backup is open-sourced software licensed under the MIT license.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

648,266,899 9,701
laravel/framework

The Laravel Framework.

604,216,237 34,982
laravel/tinker

Powerful REPL for the Laravel framework.

512,508,631 7,443
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

429,221,767 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

403,217,078 4,664

Version History

Version Released PHP Laravel License
4.10.0 ^8.3 ^9.0||^10.0||^11.0||^12.0||^13.0
4.9.0 ^8.3 ^9.0||^10.0||^11.0||^12.0
4.8.0 ^7.1|^8.0 ^5.5||^6.0||^7.0||^8.0||^9.0||^10.0||^11.0
4.7.0 ^7.1|^8.0 ^5.5||^6.0||^7.0||^8.0||^9.0||^10.0
4.6.2 ^7.1|^8.0 ^5.5||^6.0||^7.0||^8.0||^9.0