Laravel package to manage your databases (including backups) easily in a Laravel project.
Note: This package makes use of the framework-agnostic backup-manager/backup-manager package which this one is a dependency of. For more information (including Symfony driver) see that package.
Credit: This package is based on backup-manager/laravel by Shawn McCool and Mitchell van Wijngaarden. Credit to them for their great work.
- Stability Notice
- Requirements
- Installation
- Scheduling Backups
- Contribution Guidelines
- Maintainers
- License
It's stable.
I'm actively using this package in my own Laravel projects for managing backups. I would appreciate all feedback/suggestions you may have by opening a GitHub issue.
- PHP 5.5
- Laravel
- MySQL support requires
mysqldump
andmysql
command-line binaries - PostgreSQL support requires
pg_dump
andpsql
command-line binaries - Gzip support requires
gzip
andgunzip
command-line binaries
Use Composer
It's super easy.
-
Run the following command:
composer require skcin7/database-manager
. -
Publish the configuration file.
php artisan vendor:publish --provider="skcin7\DatabaseManager\DatabaseManagerServiceProvider"
After publishing, edit this configuration file (which will be located in config/database-manager.php
) to your specific configuration needs.
This package makes use of your database configurations in config/database.php
. The package manages your database connections listed in that file.
Artisan Commands
After installation, there will be 3 new Artisan commands available in your project which are: database-manager:create-backup
, database-manager:list-backups
, and database-manager:restore-backup
.
Now you can schedule your Laravel database backups (such as a daily backup) using Laravel Task Scheduling.
Inside app/Console/Kernel.php
:
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('database-manager:create-backup')->daily();
}
// TODO
This package is maintained by Nick Morgan.
This package is published under the MIT License.