GithubHelp home page GithubHelp logo

rahulyhg / phpbu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sebastianfeldmann/phpbu

0.0 1.0 0.0 1.39 MB

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

Home Page: https://phpbu.de

License: Other

PHP 99.84% Shell 0.13% Smarty 0.03%

phpbu's Introduction

PHPBU

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

Features

  • 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

Requirements

  • PHP >= 7.0
    • 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.

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

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.
  --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"
         xsi:noNamespaceSchemaLocation="http://schema.phpbu.de/5.0/phpbu.xsd"
         verbose="true">
    <backups>
      <backup name="myAppDB">
        <!-- 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>

phpbu's People

Contributors

sebastianfeldmann avatar chrishawes avatar f21 avatar cerw avatar josemalonsom avatar annibalem avatar arkste avatar egifford avatar smertius avatar mika- avatar ephraim avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.