3 Unstar Star 0 Fork 1

崔鹏宇 / flybirdcmsPHPApache-2.0

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
Nothing here. spread retract

Clone or download
DbBackupTask.php 579 Bytes
Copy Edit Web IDE Raw Blame History
崔鹏宇 authored 2018-12-29 19:13 . 增加了自动备份功能
<?php
/**
* Created by PhpStorm.
* User: cuipengyu
* Date: 2018-12-29
* Time: 14:35
*/
namespace app\admin\command;
use think\console\Command;
use think\Db;
use think\Log;
use tp5er\Backup;
class DbBackupTask extends Command
{
protected function configure()
{
$this->setName('dbBackupTask')->setDescription('Now backup database ');
}
protected function execute(Input $input, Output $output)
{
$bc = new Backup(config('dbbackup'));
$file=['name'=>date('Ymd-His'),'part'=>1];
$bc->setFile($file)->backupAll();
}
}

Comment ( 0 )

Sign in for post a comment

PHP
1
https://gitee.com/cuipengyu/flybirdcms.git
git@gitee.com:cuipengyu/flybirdcms.git
cuipengyu
flybirdcms
flybirdcms
master

Search