2017 © Pedro Peláez
 

library maratus-php-backup

Backup different types databases(Couchdb, MongoDB, MySQL, PostgreSQL, Redis, Riak, SQLite) on local or remote to Google Drive, Dropbox, Copy, FTP etc.

image

dzasa/maratus-php-backup

Backup different types databases(Couchdb, MongoDB, MySQL, PostgreSQL, Redis, Riak, SQLite) on local or remote to Google Drive, Dropbox, Copy, FTP etc.

  • Saturday, March 14, 2015
  • by dzasa
  • Repository
  • 4 Watchers
  • 19 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 1 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Maratus PHP Backup

Backup more types of databases, local files and store them on local, ftp, google drive, dropbox etc., (*1)

Features

  1. Available storage clients
    • Local
    • FTP
    • Google Drive
    • Dropbox
    • Copy.com
  2. Available databases
    • MySQL
    • Postgresql
    • SQLite
    • MongoDB
    • Redis
    • Riak
    • CouchDB
  3. Sending files in compressed format - ZIP, GNU tar, BSD tar
  4. Connect to remote host via SSH with private key(password protected too) or normal username/password, compress and download with SCP

Documentation and Info

Full documentation and extra info Will be on GitHub ProjectPage :), (*2)

Usage


require 'vendor/autoload.php'; use Dzasa\MaratusPhpBackup\MaratusBackup; $backup = new MaratusBackup(); $dbConfig = array( 'type' => 'mysql', 'host' => "localhost", 'port' => 3306, 'user' => 'root', 'pass' => '', 'database' => '' ); $backup->addDatabase($dbConfig); $dbConfigPg = array( 'type' => 'postgresql', 'host' => "localhost", 'port' => 5432, 'user' => '', 'pass' => '', 'database' => '' ); $backup->addDatabase($dbConfigPg); $dbConfigMongo = array( 'type' => 'mongodb', 'database' => '', 'host' => '', 'user' => 'dzasa', 'pass' => '' ); $backup->addDatabase($dbConfigMongo); $couchDbConfig = array( 'type' => 'couchdb', 'remote' => true, 'host' => 'localhost', 'user' => 'root', 'pass' => '', 'database' => '', ); $backup->addDatabase($couchDbConfig); $dbConfig2 = array( 'type' => 'mysql', 'host' => "localhost", 'port' => 3306, 'user' => '', 'pass' => '', 'database' => '' ); $backup->addDatabase($dbConfig2); $dBoxConfig = array( 'access_token' => '' ); $backup->addDropbox($dBoxConfig); $gDriveConfig = array( 'client_id' => '', 'client_secret' => '', 'token_file' => 'gdrive-token.json', 'auth_code' => '' ); $backup->addGdrive($gDriveConfig); $redisConfig = array( 'type' => 'redis', 'remote' => true, 'host' => '192.168.1.1', 'user' => 'root', 'private_key' => '', 'private_key_pass' => '', 'database_path' => "/var/lib/redis/dump.rdb", ); $backup->addDatabase($redisConfig); $riakConfig = array( 'type' => 'riak', 'remote' => true, 'host' => '192.168.1.1', 'user' => 'root', 'private_key' => '', 'private_key_pass' => '@', 'bitcask_path' => '/var/lib/riak/bitcask', 'leveldb_path' => '/var/lib/riak/leveldb', 'strong_consistency_path' => '/var/lib/riak/ensembles', 'remote_compress' => 'zip', ); $backup->addDatabase($riakConfig); $sqliteConfig = array( 'type' => 'sqlite', 'remote' => true, 'host' => '192.168.1.1', 'user' => 'root', 'private_key' => '', 'private_key_pass' => '', 'remote_compress' => 'zip', 'database_path' => '/root/backup', ); $backup->addDatabase($sqliteConfig); $copyConfig = array( 'type' => 'copy', 'consumer_key' => '', 'consumer_secret' => '', 'access_token' => '', 'token_secret' => '', ); $backup->addStorage($copyConfig); $localStorageConfig = array( 'type' => 'local', 'save_dir' => 'test2', ); $backup->addStorage($localStorageConfig); $ftpStorage = array( 'type' => 'ftp', 'host' => '192.168.1.1', 'user' => '', 'pass' => '', 'remote_dir' => 'test2', ); $backup->addStorage($ftpStorage); $backup->backup("tar.bz2"); print_r($backup->getDatabaseBackupResult()); echo "-----------------------------\n"; print_r($backup->getStorageBackupResult());

About

Requirements

  • PHP Zippy
  • Copy.com PHP SDK
  • Dropbox SDK
  • Google API Client
  • PHPSeclib
  • Symfony Filesystem
  • Symfony Proccess
  • Guzzle

Submitting bugs and feature requests

Bugs and feature request are tracked on GitHub, (*3)

Version

Soon :), (*4)

Author

Jasenko Rakovic - naucnik@gmail.com, (*5)

License

Licensed under the MIT License - see the LICENSE file for details, (*6)

The Versions

14/03 2015

dev-master

9999999-dev http://dzasa.github.io/maratus-php-backup/

Backup different types databases(Couchdb, MongoDB, MySQL, PostgreSQL, Redis, Riak, SQLite) on local or remote to Google Drive, Dropbox, Copy, FTP etc.

  Sources   Download

MIT

The Requires

 

by Jasenko Rakovic

mongodb database php postgresql redis couchdb mysql ssh backup remote sqlite ftp archive copy dropbox google drive compress riak maratus

14/03 2015

v0.1.0

0.1.0.0 http://github.com/dzasa/maratus-php-backup

Backup MySQL database using Email, FTP, Local storage, Online file storage like Google Drive, Dropbox

  Sources   Download

MIT

The Requires

 

by Jasenko Rakovic

database php mysql backup