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

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

phpbu/phpbu
===========

PHP Backup utility.

6.0.31(3mo ago)1.3k89.0k↓22.4%109[57 issues](https://github.com/sebastianfeldmann/phpbu/issues)[1 PRs](https://github.com/sebastianfeldmann/phpbu/pulls)4MITPHPPHP &gt;=8.1CI failing

Since Nov 28Pushed 3mo ago38 watchersCompare

[ Source](https://github.com/sebastianfeldmann/phpbu)[ Packagist](https://packagist.org/packages/phpbu/phpbu)[ Docs](https://phpbu.de/)[ GitHub Sponsors](https://github.com/sponsors/sebastianfeldmann)[ RSS](/packages/phpbu-phpbu/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (16)Versions (141)Used By (4)

PHPBU
=====

[](#phpbu)

**PHP Backup Utility**

*PHPBU* is a php tool that creates and encrypts backups, syncs your backups to other servers or cloud services and assists you monitor your backup creation.

Get an in depth look into all the features and a short 'getting started' tutorial at the [PHPBU Website](https://www.phpbu.de).

[![Latest Stable Version](https://camo.githubusercontent.com/81f254cf4986897dedded5d9393d1214af6273f707a5c1d15a2d757d108ec836/68747470733a2f2f706f7365722e707567782e6f72672f70687062752f70687062752f762f737461626c652e737667)](https://packagist.org/packages/phpbu/phpbu)[![Minimum PHP Version](https://camo.githubusercontent.com/905c670b6e3bc20026bddbc8923df4d38111e526b88f1252ac4ceb6643299d96/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e302d3838393242462e737667)](https://php.net/)[![Downloads](https://camo.githubusercontent.com/4b2d52a57c9df9d16598dc3ab45047669bebc5aa989c9c1637920966fb43a3b6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70687062752f70687062752e7376673f7631)](https://packagist.org/packages/phpbu/phpbu)[![License](https://camo.githubusercontent.com/49c47bc9edd0fefb778b1f9e6f9b3828dfc5b603a251da43730a257f86f72c9f/68747470733a2f2f706f7365722e707567782e6f72672f70687062752f70687062752f6c6963656e73652e737667)](https://packagist.org/packages/phpbu/phpbu)[![Build Status](https://github.com/sebastianfeldmann/phpbu/workflows/Integration/badge.svg)](https://github.com/sebastianfeldmann/phpbu/actions)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f9ebd50ff05adb0ee8bafa42733ccb6a882a790971b1793cd385912991756a25/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73656261737469616e66656c646d616e6e2f70687062752f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sebastianfeldmann/phpbu/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/fbeaa73ec27983e08cb2ede6166a935726e9f166696dad07161429c54219b50f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73656261737469616e66656c646d616e6e2f70687062752f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sebastianfeldmann/phpbu/?branch=master)[![PHP Website](https://camo.githubusercontent.com/7383a116d6841b3efbec8d39cdf1e9da59b14dffd0e0f04f55fa7b16918069bb/68747470733a2f2f696d672e736869656c64732e696f2f776562736974652d75702d646f776e2d677265656e2d7265642f68747470732f70687062752e64652e737667)](https://www.phpbu.de)

If you are not using php 8.1 or greater already you can still use phpbu version [6.0.30](https://phar.phpbu.de/phpbu-6.0.20.phar)
If you are not using php 8.0 or greater already you can still use phpbu version [6.0.20](https://phar.phpbu.de/phpbu-6.0.20.phar)
If you are not using php 7.2 or greater already you can still use phpbu version [5.2.10](https://phar.phpbu.de/phpbu-5.2.10.phar)
If you are behind php 7.0 you can still use phpbu version [4.0.10](https://phar.phpbu.de/phpbu-4.0.10.phar)

Features
--------

[](#features)

- Creating backups
    - ArangoDB
    - Directories
    - Elasticsearch
    - InfluxDB
    - Ldap
    - MongoDB
    - MySQL
    - Percona XtraBackup
    - PostgreSQL
    - Redis
- Compress backups
    - bzip2
    - gzip
    - xz
    - zip
- Validate backups
    - Check min size
    - Comparing with previous backups
- Encrypting backups
    - mcrypt
    - openssl
- Sync backups to other locations
    - Amazon s3
    - Azure Blob
    - Dropbox
    - FTP
    - Google Drive
    - Google Cloud Storage
    - OpenStack
    - rsync
    - SFTP
    - Softlayer
- Cleanup your local backup
    - Delete backups older x
    - Store only x MB of backups
    - Keep only last x backups
    - Keep less backups for more distant past
- Writing backup reports
    - Text file
    - Json file
    - Mail
    - Prometheus
    - Telegram
    - Webhook

Requirements
------------

[](#requirements)

- PHP &gt;= 7.2
    - ext/curl
    - ext/dom
    - ext/json
    - ext/spl
- POSIX Shell
    - tar
    - bzip2 or gzip

Installation
------------

[](#installation)

You can [download](https://phar.phpbu.de/phpbu.phar) a PHP Archive [(PHAR)](http://php.net/phar) that bundles everything you need to run *PHPBU* in a single file.

```
wget https://phar.phpbu.de/phpbu.phar
chmod +x phpbu.phar
php phpbu.phar --version

```

For convenience, you can move the PHAR to a directory that is in your [PATH](http://en.wikipedia.org/wiki/PATH_%28variable%29).

```
mv phpbu.phar /usr/local/bin/phpbu
phpbu --version

```

Using [PHIVE](https://phar.io) to install *PHPBU*.

```
phive install phpbu

```

Installing *PHPBU* via Composer is also supported.

```
  "require": {
    "phpbu/phpbu": "^6.0"
  }
```

Usage
-----

[](#usage)

```
phpbu [option]

  --bootstrap=       A "bootstrap" PHP file that is included before the backup.
  --configuration=   A phpbu xml config file.
  --colors                 Use colors in output.
  --debug                  Display debugging information during backup generation.
  --generate-configuration Create a new configuration skeleton.
  --limit=         Limit backup execution to a subset.
  --simulate               Perform a trial run with no changes made.
  --restore                Print a restore guide.
  -h, --help               Print this usage information.
  -v, --verbose            Output more verbose information.
  -V, --version            Output version information and exit.

```

### Usage Examples

[](#usage-examples)

```
$ phpbu

```

This requires a valid XML *PHPBU* configuration file (phpbu.xml or phpbu.xml.dist) in your current working directory. Alternatively, you can specify the path to your configuration file. An important thing to note is that all path inside the configuration should be absolute or relative to the configuration file itself.

```
$ phpbu --configuration=backup/config.xml

```

Use the *--limit* option to execute only a subset of your configured backups.

```
$ phpbu --limit=myAppDB

```

A dry run without any actual impact is executed with the *--simulate* option.

```
$ phpbu --simulate

```

To show a guide how to restore your backup use the *--restore* option.

```
$ phpbu --restore

```

Configuration Example
---------------------

[](#configuration-example)

Simple configuration example in XML:

```

```

Simple configuration example in JSON:

```
{
   "verbose":true,
   "backups":[
      {
         "name":"myAppDB",
         "source":{
            "type":"mysqldump",
            "options":{
               "databases":"mydbname",
               "user":"user.name",
               "password":"topsecret"
            }
         },
         "target":{
            "dirname":"backup",
            "filename":"mysql-%Y%m%d-%H%i.sql",
            "compress":"bzip2"
         }
      }
   ]
}
```

###  Health Score

70

—

ExcellentBetter than 100% of packages

Maintenance79

Regular maintenance activity

Popularity57

Moderate usage in the ecosystem

Community39

Small or concentrated contributor base

Maturity90

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 90.4% 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 ~30 days

Recently: every ~109 days

Total

135

Last Release

103d ago

Major Versions

2.1.15 → 3.0.x-dev2016-02-07

3.2.x-dev → 4.0.02016-11-17

4.0.10 → 5.0.02017-08-08

4.0.11 → 5.0.92018-01-13

5.2.x-dev → 6.0.02019-09-11

PHP version history (4 changes)5.0.0PHP &gt;=7.0.0

6.0.0PHP &gt;=7.2.0

6.0.21PHP &gt;=8.0

6.0.31PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/ff7f9d23dc999a4fa9cfb1ae3ce878be8cec0e4eb63eb47b120135df1003ea3c?d=identicon)[phpbu](/maintainers/phpbu)

---

Top Contributors

[![sebastianfeldmann](https://avatars.githubusercontent.com/u/9250358?v=4)](https://github.com/sebastianfeldmann "sebastianfeldmann (1210 commits)")[![moebrowne](https://avatars.githubusercontent.com/u/8448512?v=4)](https://github.com/moebrowne "moebrowne (23 commits)")[![ohmydevops](https://avatars.githubusercontent.com/u/21690865?v=4)](https://github.com/ohmydevops "ohmydevops (13 commits)")[![rhorber](https://avatars.githubusercontent.com/u/4517789?v=4)](https://github.com/rhorber "rhorber (7 commits)")[![ddattee](https://avatars.githubusercontent.com/u/17987586?v=4)](https://github.com/ddattee "ddattee (7 commits)")[![erkiaas](https://avatars.githubusercontent.com/u/25956365?v=4)](https://github.com/erkiaas "erkiaas (7 commits)")[![jbouzekri](https://avatars.githubusercontent.com/u/880996?v=4)](https://github.com/jbouzekri "jbouzekri (7 commits)")[![planetahuevo](https://avatars.githubusercontent.com/u/2963191?v=4)](https://github.com/planetahuevo "planetahuevo (7 commits)")[![CiderAndWhisky](https://avatars.githubusercontent.com/u/30117084?v=4)](https://github.com/CiderAndWhisky "CiderAndWhisky (7 commits)")[![bytestream](https://avatars.githubusercontent.com/u/1788397?v=4)](https://github.com/bytestream "bytestream (6 commits)")[![chrishawes](https://avatars.githubusercontent.com/u/143662?v=4)](https://github.com/chrishawes "chrishawes (5 commits)")[![vldmr-k](https://avatars.githubusercontent.com/u/2142055?v=4)](https://github.com/vldmr-k "vldmr-k (5 commits)")[![hype09](https://avatars.githubusercontent.com/u/6646802?v=4)](https://github.com/hype09 "hype09 (4 commits)")[![angelfs](https://avatars.githubusercontent.com/u/7326299?v=4)](https://github.com/angelfs "angelfs (3 commits)")[![cerw](https://avatars.githubusercontent.com/u/16146?v=4)](https://github.com/cerw "cerw (3 commits)")[![F21](https://avatars.githubusercontent.com/u/2263040?v=4)](https://github.com/F21 "F21 (3 commits)")[![marcelthole](https://avatars.githubusercontent.com/u/850125?v=4)](https://github.com/marcelthole "marcelthole (3 commits)")[![mattsches](https://avatars.githubusercontent.com/u/68414?v=4)](https://github.com/mattsches "mattsches (3 commits)")[![JekaKey](https://avatars.githubusercontent.com/u/1628313?v=4)](https://github.com/JekaKey "JekaKey (2 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (2 commits)")

---

Tags

backupencrypted-backupshacktoberfestmongodb-backupmysql-backupphppostgresql-backupredis-exportercloudsftpbackupelasticsearchtarmysqlpostgresmongodbinfluxdbArangoDbrsync

### Embed Badge

![Health badge](/badges/phpbu-phpbu/health.svg)

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

###  Alternatives

[dg/adminer-custom

Customization for Adminer, the best database management tool written in PHP.

134765.7k16](/packages/dg-adminer-custom)[apix/cache

A thin PSR-6 cache wrapper with a generic interface to various caching backends emphasising cache taggging and indexing to Redis, Memcached, PDO/SQL, APC and other adapters.

114542.8k6](/packages/apix-cache)[rybakit/phive-queue

$queue-&gt;push('I can be popped off after', '10 minutes');

16441.5k1](/packages/rybakit-phive-queue)[symfony/ai-store

Low-level abstraction for storing and retrieving documents in a vector store.

19292.4k53](/packages/symfony-ai-store)[dg/adminer

Customization for Adminer, the best database management tool written in PHP.

1342.5k](/packages/dg-adminer)[phpsu/phpsu

Synchronisation Utility: File and Database

1685.6k](/packages/phpsu-phpsu)

PHPackages © 2026

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