pentangle/pentangle-laravel-backup-config

An in house package for configuring backups with s3

1.0.6 2022-02-16 23:24 UTC

This package is auto-updated.

Last update: 2024-10-28 19:46:25 UTC


README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Installation

You can install the package via composer:

composer require pentangle/pentangle-laravel-backup-config

Usage

Add the following disk configuration to filesystems.php

    'pentangle-s3' => [
        'driver'   => 's3',
        'key'      => env('PENTANGLE_AWS_ACCESS_KEY_ID'),
        'secret'   => env('PENTANGLE_AWS_SECRET_ACCESS_KEY'),
        'region'   => env('PENTANGLE_AWS_DEFAULT_REGION'),
        'bucket'   => env('PENTANGLE_AWS_BUCKET'),
        'url'      => env('PENTANGLE_AWS_URL'),
        'endpoint' => env('PENTANGLE_AWS_ENDPOINT'),
        'root'     => str_replace(['http://', 'https://'], '', env('APP_URL', 'example.com')),
    ],

Add the following service provider to config/app.php (optional)

    \Pentangle\PentangleLaravelBackupConfig\PentangleLaravelBackupServiceProvider::class,

Publish the config file (optional)

    php artisan vendor:publish --provider="Pentangle\PentangleLaravelBackupConfig\PentangleLaravelBackupServiceProvider"

For testing locally with s3 ensure the correct path to mysqldump is set in config/databases.php

    'dump'           => [
        'dump_binary_path' => env('APP_ENV') === 'local' ? '/usr/local/opt/mysql-client/bin' : '/usr/bin',
    ],

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.