PHPackages                             wamkj/thinkphp6.0-databackup - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. wamkj/thinkphp6.0-databackup

ActiveLibrary[Database &amp; ORM](/categories/database)

wamkj/thinkphp6.0-databackup
============================

thinkphp6.0的数据库自动备份扩展

v1.0(6y ago)113623Apache-2.0PHPPHP &gt;=7.1.0

Since Feb 15Pushed 6y agoCompare

[ Source](https://github.com/wamkj/thinkphp6.0-databackup)[ Packagist](https://packagist.org/packages/wamkj/thinkphp6.0-databackup)[ RSS](/packages/wamkj-thinkphp60-databackup/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

### 使用composer进行安装

[](#使用composer进行安装)

```
composer require wamkj/thinkphp6.0-databackup

```

### 引入类文件

[](#引入类文件)

```
use wamkj\thinkphp\Backup;

```

### 配置文件

[](#配置文件)

```
$config=array(
    'path'     => './Data/',//数据库备份路径
    'part'     => 20971520,//数据库备份卷大小
    'compress' => 0,//数据库备份文件是否启用压缩 0不压缩 1 压缩
    'level'    => 9 //数据库备份文件压缩级别 1普通 4 一般  9最高
);

```

### 实例化

[](#实例化)

```
 $db= new Backup($config);

```

### 数据类表列表

[](#数据类表列表)

```
return $this->fetch('index',['list'=>$db->dataList()]);

```

### 备份文件列表

[](#备份文件列表)

```
  return $this->fetch('importlist',['list'=>$db->fileList()]);

```

### 备份表

[](#备份表)

```
 $start= $db->setFile($file)->backup($tables[$id], $start);

```

### 导入表

[](#导入表)

```
 $start= $db->setFile($file)->import($start);

```

### 删除备份文件

[](#删除备份文件)

```
    $db->delFile($time);

```

### 修复表

[](#修复表)

```
    $db->repair($tables)

```

### 优化表

[](#优化表)

```
    $db->optimize($tables)

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2285d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2169f33565ae9c2988e8315cdd43cffbdc9453e4f738d934bd79743e3a1dbe45?d=identicon)[1149183529](/maintainers/1149183529)

---

Top Contributors

[![return-com](https://avatars.githubusercontent.com/u/40825094?v=4)](https://github.com/return-com "return-com (4 commits)")

---

Tags

thinkphpthinkphp6tp5tp6thinkphpthink-databackup

### Embed Badge

![Health badge](/badges/wamkj-thinkphp60-databackup/health.svg)

```
[![Health](https://phpackages.com/badges/wamkj-thinkphp60-databackup/health.svg)](https://phpackages.com/packages/wamkj-thinkphp60-databackup)
```

###  Alternatives

[nhzex/think-phinx

Phinx integration for thinkphp

243.1k](/packages/nhzex-think-phinx)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
