Skip to content
/ phpbu Public
forked from sebastianfeldmann/phpbu

PHP Backup Utility - Create database and file backups, sync to other servers or cloud services, and much more.

License

Notifications You must be signed in to change notification settings

cerw/phpbu

This branch is 1069 commits behind sebastianfeldmann/phpbu:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e569ea1 · Mar 5, 2015
Mar 2, 2015
Mar 1, 2015
Mar 5, 2015
Mar 5, 2015
Mar 1, 2015
Feb 28, 2015
Feb 26, 2015
Feb 9, 2015
Mar 1, 2015
Feb 21, 2015
Mar 5, 2015
Nov 30, 2014
Feb 27, 2015
Feb 6, 2015
Feb 27, 2015

Repository files navigation

PHPBU

PHP Backup Utility

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

Get detailed information about all the features and a 'getting started' tutorial at the PHPBU Website.

Latest Stable Version Latest Unstable Version License Build Status

Features

  • Creating backups
    • Directories
    • MySQL
    • PostgreSQL (planned)
  • Validate backups
    • Check min size
    • Comparing with previous backups
  • Sync backups to other locations
    • Amazon s3
    • copy.com
    • Dropbox
    • rsync
    • SFTP
  • Cleanup you backup location
    • Delete backups older x
    • Store only x MB of backups
    • Keep only last x backups

Requirements

  • PHP 5.3+
    • ext/curl
    • ext/dom
    • ext/json
    • ext/spl
  • POSIX Shell
    • mysqldump
    • tar
    • bzip2 or gzip
    • rsync

Installation

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

wget http://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

Installing PHPBU via Composer is also supported.

  "require": {
    "phpbu/phpbu": "1.1.*"
  }

Usage

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.
  -h, --help             Prints 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

Configuration

Simple configuration example:

  <?xml version="1.0" encoding="UTF-8"?>
  <phpbu xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation="http://schema.phpbu.de/1.1/phpbu.xsd"
         verbose="true">
    <backups>
      <backup>
        <!-- source -->
        <source type="mysqldump">
          <option name="databases" value="mydbname"/>
          <option name="user" value="user.name"/>
          <option name="password" value="topsecret"/>
        </source>
        <!-- where should the backup be stored -->
        <target dirname="backup/mysql"
                filename="mysqldump-%Y%m%d-%H%i.sql"
                compress="bzip2"/>
      </backup>
    </backups>
  </phpbu>

About

PHP Backup Utility - Create database and file backups, sync to other servers or cloud services, and much more.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%