a2design-inc/laravel-db-backup 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

a2design-inc/laravel-db-backup

Composer 安装命令:

composer require a2design-inc/laravel-db-backup

包简介

Artisan command for backup Laravel application database

README 文档

README

Installation

You can install this package via composer using:

composer require a2design-inc/laravel-db-backup

Register the provider (config/app.php) for Laravel < 5.5 or if you don't use auto-discovery:

'providers' => [
    ...
    /*
     * Package Service Providers...
     */
    A2design\DbBackup\DbBackupServiceProvider::class,
    ...
],

Usage

For backup the database use next command

php artisan db:backup

Also you can list all existed backups (for example before restore) using next command

php artisan db:backups-list

And for restore backup use next command

php artisan db:restore

By default this command will use latest backup, but you can provide filename of existed backup

php artisan db:restore 2017-12-17.sql[.gz]

In this case using compression will be detected automatically.

Scheduling

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

// 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.

License

Licensed under The MIT License

Developed by A2 Design Inc.

统计信息

  • 总下载量: 106
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 6
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-12-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固