Want to take your software engineering career to the next level? Join the mailing list for career tips & advice Click here


PHP Backup Utility - Creates and encrypts database and file backups, syncs your backups to other servers or cloud services and assists you monitor your backup process

Subscribe to updates I use phpbu

Statistics on phpbu

Number of watchers on Github 782
Number of open issues 15
Average time to close an issue 24 days
Main language PHP
Average time to merge a PR about 2 hours
Open pull requests 0+
Closed pull requests 3+
Last commit over 2 years ago
Repo Created over 5 years ago
Repo Last Updated over 2 years ago
Size 1.39 MB
Homepage https://phpbu.de
Organization / Authorsebastianfeldmann
Latest Release4.0.11
Page Updated
Do you use phpbu? Leave a review!
View open issues (15)
View phpbu activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Software engineers: It's time to get promoted. Starting NOW! Subscribe to my mailing list and I will equip you with tools, tips and actionable advice to grow in your career.
Evaluating phpbu for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)


PHP Backup Utility

PHPBU is a php framework 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.

Latest Stable Version Minimum PHP Version Downloads License Build Status Scrutinizer Code Quality Code Coverage PHP Website

If you are not using php 7.0 or greater already you can still use phpbu version 4.0.10


  • Creating backups
    • ArangoDB
    • Directories
    • Elasticsearch
    • 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
    • Dropbox
    • FTP
    • 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


  • PHP >= 7.0
    • ext/curl
    • ext/dom
    • ext/json
    • ext/spl
  • POSIX Shell
    • tar
    • bzip2 or gzip


You can download a PHP Archive (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.

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

Using PHIVE to install PHPBU.

phive install phpbu

Installing PHPBU via Composer is also supported.

  "require": {
    "phpbu/phpbu": "~5.0"


phpbu [option]

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

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.

$ phpbu --configuration=backup/config.xml

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

$ phpbu --limit=myAppDB

Use the --simulate option to perform a trial run without actually executing the configured backups.

$ phpbu --simulate

Configuration Example

Simple configuration example:

  <?xml version="1.0" encoding="UTF-8"?>
  <phpbu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      <backup name="myAppDB">
        <!-- source -->
        <source type="mysqldump">
          <option name="databases" value="mydbname"/>
          <option name="user" value="user.name"/>
          <option name="password" value="topsecret"/>
        <!-- where should the backup be stored -->
        <target dirname="backup/mysql"
phpbu open issues Ask a question     (View All Issues)
  • about 4 years Sia decentralized backups
  • over 4 years Remove 3.x deprecated features
  • over 4 years Add a League Flysystem Sync
  • over 4 years Support google cloud drive for sync
  • over 4 years Idea: Get db credentials from project config
  • over 4 years Add incremental backup sopport for 'XtraBackup' source
  • over 5 years Vagrantfile and setup script for easy setup of test environment
phpbu list of languages used
phpbu latest release notes
4.0.11 4.0.11

Change Dropbox lib to switch to API version 2

5.0.8 5.0.8
  • Fixed detectCmdLocation issue - thanks to Ed Gifford's (@egifford) pull request #125
5.0.7 5.0.7
  • Allow multiple adapter values in a single configuration value - Issue #121
  • Allow adapter values for backup name and target settings - Issue #121
Other projects in PHP