Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
P

phpbu

> 数据库
Open source

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 p

1.3K stars0 likes3 views
WebsiteGitHub

About

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 p

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. If you are not using php 8.1 or greater already you can still use phpbu version 6.0.30
If you are not using php 8.0 or greater already you can still use phpbu version 6.0.20
If you are not using php 7.2 or greater already you can still use phpbu version 5.2.10
If you are behind php 7.0 you can still use phpbu version 4.0.10

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

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

Installation

You can download a PHP Archive (PHAR) that bundles everything you need to run PHPBU in a single file.

bash
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.

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

Usage

…

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

Simple configuration example in XML:

xml
  
  
    
      
        
        
          
          
          
        
        
        
      
    
  

Simple configuration example in JSON:

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"
         }
      }
   ]
}

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

PHPbackupencrypted-backupshacktoberfestmongodb-backup

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库