数据库备份

This commit is contained in:
xurongyao 2018-09-17 15:24:13 +08:00
parent 59e3a6bda9
commit 2a66216c6f

View File

@ -13,14 +13,12 @@ use \tp5er\Backup;
*/ */
class SystemDatabackup extends AuthController class SystemDatabackup extends AuthController
{ {
/**
* 数据类表列表
*/
public function index(){ public function index(){
$config=array(
'path' => './Data/',//数据库备份路径 $db= new Backup();
'part' => 20971520,//数据库备份卷大小
'compress' => 0,//数据库备份文件是否启用压缩 0不压缩 1 压缩
'level' => 9 //数据库备份文件压缩级别 1普通 4 一般 9最高
);
$db= new Backup($config);
var_dump($db->dataList()); var_dump($db->dataList());
// return $this->fetch('index',['list'=>$db->dataList()]); // return $this->fetch('index',['list'=>$db->dataList()]);
// return $this->fetch(); // return $this->fetch();