amitavroy / backup-manager
This Laravel package allows you to create a backup of your database. You can use any file system which Laravel supports like S3, FTP, local etc.
Requires
- spatie/db-dumper: ^2.9
This package is auto-updated.
Last update: 2024-10-13 13:18:08 UTC
README
This Laravel package allows you to create a backup of your database. You can use any file system which Laravel supports like S3, FTP, local etc.
Installation
Auto discovery
If you are using Laravel 5.6, then this package supports auto-discovery and so you don't need to do anything and can directly skip to the configuration part.
Normal installation
To install the package, run the following command
composer require amitavroy/backup-manager
Add the service provider inside app.php
Amitav\Backup\BackupServiceProvider::class,
After adding the service provider, publish the config file using
php artisan vendor:publish --provider="Amitav\Backup\BackupServiceProvider"
Configuration
The config file contains documentation on folder structure and other details. If you are using any other file system like S3, you will need to ensure the env variables are setup for the backup to work.
Some important env variables explained:
If you are using S3 file system you will need to run the below command to pull the package
composer require league/flysystem-aws-s3-v3
For this package to automatically take backup of the database, you need to add the command in you Kernel.php inside the app\Console folder.
Example:
protected $commands = [
BackupDatbase::class,
];
$schedule->command('backup:database')->daily();