mydisha / mds-backup by mydisha

Laravel 5 Command Line Tool for Backup Database
43
0
3
Package Data
Maintainer Username: mydisha
Maintainer Contact: diastaufik@gmail.com (Dias Taufik Rahman)
Package Create Date: 2016-10-28
Package Last Update: 2016-10-28
Language: PHP
License: MIT
Last Refreshed: 2024-11-23 03:16:52
Package Statistics
Total Downloads: 43
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 3
Total Forks: 0
Total Open Issues: 0

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