PHPackages                             gelaku/laravel-backup - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. gelaku/laravel-backup

ActiveLibrary[File &amp; Storage](/categories/file-storage)

gelaku/laravel-backup
=====================

数据库备份或还原

v1.1(4y ago)01.1k11MITPHPPHP &gt;=7.3

Since Jan 12Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Gelaku/laravel-backup)[ Packagist](https://packagist.org/packages/gelaku/laravel-backup)[ RSS](/packages/gelaku-laravel-backup/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (3)Used By (1)

 laravel-backup
================

[](#-laravel-backup-)

 数据库备份或还原.

Installing
----------

[](#installing)

```
composer require gelaku/laravel-backup -vvv
```

使用
--

[](#使用)

Laravel 配置写在 config/database.php 中：

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

```
use Gelaku\LaravelBackup\Backup;
$backup = new Backup();

// 数据类表列表
$data = $backup->dataList();
// 备份文件列表
$data = $backup->fileList();
// 备份数据库表单
$data = $backup->backup($table);
// 导入表
$time = $request->input('time');
$file  = $backup->getFile('timeverif',$time);
$data = $backup->setFile($file)->import(0,$time);
// 修复表
$data = $backup->repair($tables);
// 优化表
$data = $backup->optimize($tables);
// 下载
$data = $backup->downloadFile($time);
```

Usage
-----

[](#usage)

TODO

Contributing
------------

[](#contributing)

You can contribute in one of three ways:

1. File bug reports using the [issue tracker](https://github.com/gelaku/laravel-backup/issues).
2. Answer questions or fix bugs on the [issue tracker](https://github.com/gelaku/laravel-backup/issues).
3. Contribute new features or update the wiki.

*The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.*

License
-------

[](#license)

MIT

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity45

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

Every ~41 days

Total

2

Last Release

1541d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/221bd033872201320457b2ed5b4b750b096ca05a4cc02c2a87829cf465908f91?d=identicon)[Gelaku](/maintainers/Gelaku)

---

Top Contributors

[![Gelaku](https://avatars.githubusercontent.com/u/18202049?v=4)](https://github.com/Gelaku "Gelaku (10 commits)")

---

Tags

backuplaravel

### Embed Badge

![Health badge](/badges/gelaku-laravel-backup/health.svg)

```
[![Health](https://phpackages.com/badges/gelaku-laravel-backup/health.svg)](https://phpackages.com/packages/gelaku-laravel-backup)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

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