mydisha/mds-backup

Laravel 5 Command Line Tool for Backup Database
43
Install
composer require mydisha/mds-backup
PHP:>=5.5.0
License:MIT
Last Updated:Oct 28, 2016
Links: GitHub  ·  Packagist
Maintainer: mydisha

mds-backup

Based on open source project https://github.com/larkinwhitaker/laravel-db-backup

Support Laravel Version 5, 5.1, 5.2, 5.3.

Installation

Update composer.json and put this package

"mydisha/mds-backup": "dev-master"

Or run following command

composer require mydisha/mds-backup

Next step, Edit Service Provider, located in config/app.php and put this into 'providers' array.

'providers' => array(
    'Mydisha\MdsBackup\DBBackupServiceProvider'
)

Configuration

Publish the configuration file into your project by run this command

php artisan vendor:publish

Usage

Backup

Create mysql dump file with default location in /storage/backup_db

php artisan db:backup
For specific database
php artisan db:backup --database=mysql

Restore

To restore the dump mysql file, run this following command

php artisan db:restore [dbname]

To show list of dump file, run this following command

php artisan db:restore

Change Initial Dump Filename

by default this package using datetime as file name, but you can change the filename started with your custome name, ex : laravel-date.sql

you can change at config file mds-backup.php

    'initial_name' => '',

Original Contributor

https://github.com/larkinwhitaker

Related Packages

nwidart/db-exporter

Export your database quickly and easily as a Laravel Migration and all the data...

39,126 377
cornford/backup

An easy way backup and restore databases in Laravel.

25,705 40
nobodyiscertain/laravel-db-commands

A set of Artisan commands to help with database tasks.

2,235 1
nicklayb/laravel-db-import

Laravel database import package for easy manipulations

9,806 2
elimuswift/db-exporter

Export your database quickly and easily as a Laravel Migration and all the data...

4,696 36