2017 © Pedro Peláez
 

library laravel-db-backup

Artisan command for backup Laravel application database

image

a2design-inc/laravel-db-backup

Artisan command for backup Laravel application database

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 3 % Grown

The README.md

Artisan command for backup Laravel application database

Installation

You can install this package via composer using:, (*1)

``` bash composer require a2design-inc/laravel-db-backup, (*2)


Register the provider (config/app.php) for Laravel < 5.5 or if you don't use auto-discovery: ```PHP 'providers' => [ ... /* * Package Service Providers... */ A2design\DbBackup\DbBackupServiceProvider::class, ... ],

Usage

For backup the database use next command ``` bash php artisan db:backup, (*3)


Also you can list all existed backups (for example before restore) using next command ``` bash php artisan db:backups-list

And for restore backup use next command ``` bash php artisan db:restore, (*4)


By default this command will use latest backup, but you can provide filename of existed backup ``` bash php artisan db:restore 2017-12-17.sql[.gz]

In this case using compression will be detected automatically., (*5)

Scheduling

The commands can, like an other command, be scheduled in Laravel's console kernel., (*6)

// app/Console/Kernel.php

protected function schedule(Schedule $schedule)
{
   $schedule->command('db:backup')->daily()->at('00:00');
}

Of course, the schedules used in the code above are just an example. Adjust them to your own preferences., (*7)

License

Licensed under The MIT License, (*8)

Developed by A2 Design Inc., (*9)

The Versions

17/01 2018

dev-master

9999999-dev https://github.com/a2design-inc/laravel-db-backup

Artisan command for backup Laravel application database

  Sources   Download

MIT

laravel command backup

17/01 2018

1.0.2

1.0.2.0 https://github.com/a2design-inc/laravel-db-backup

Artisan command for backup Laravel application database

  Sources   Download

MIT

laravel command backup

19/12 2017

v1.0.1

1.0.1.0 https://github.com/a2design-inc/laravel-db-backup

Artisan command for backup Laravel application database

  Sources   Download

MIT

laravel command backup

19/12 2017

v1.0

1.0.0.0 https://github.com/a2design-inc/laravel-db-backup

Artisan command for backup Laravel application database

  Sources   Download

MIT

laravel command backup