2017 © Pedro Peláez
 

library mysqlbackup

Backup your mysql databases

image

bancuadrian/mysqlbackup

Backup your mysql databases

  • Friday, December 4, 2015
  • by bancu28
  • Repository
  • 0 Watchers
  • 3 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

alt tag Latest Stable Version Latest Unstable Version License Total Downloads, (*1)

Simple Mysql Backup Package

I wrote this simple package, so I can swiftly dump my database whenever I need to. Also, in conjunction with Laravel 5 console commands, you can quickly setup a backup schedule. If you have the time, you can make your own implementation of PersistenceInterface, and save the dumps to S3/Google Drive/etc., (*2)

Requirements

  • php 5.5+
  • mysqldump

Instalation

composer require bancuadrian/mysqlbackup

Usage

You can use the BackupService class to quickly start dumping databases., (*3)

  <?php
      $backupStatus = \BancuAdrian\MysqlBackup\BackupService::backup('username','password',['database1','database2'],'/path/to/backup');
  ?>

$backupStatus returns true if all are successful, or false otherwise., (*4)

Usage Laravel 5.*

After composer require, add this line to your config/app.php , providers section., (*5)

  BancuAdrian\MysqlBackup\Support\ServiceProvider::class

If you want an alias, you can add this to the alias array, (*6)

  'BackupManager' => BancuAdrian\MysqlBackup\Support\Facade::class

Publish the config file, (*7)

  php artisan vendor:publish --provider="BancuAdrian\MysqlBackup\Support\ServiceProvider"

You can now find the config in config/mysqlbackup.php . Edit it to suite your needs., (*8)

You can then backup your databases using:, (*9)

  \BackupManager::backupAll();
  // or for single database
  \BackupManager::backup('databaseName');

Features to come (soon I hope)

  • Restore
  • Backup to Google Drive
  • Backup to S3
  • Limit the number of backups in a folder
  havefun() && contribute() && !criticize() && give_advice();

The Versions

04/12 2015

dev-gdriveimplementation

dev-gdriveimplementation

Backup your mysql databases

  Sources   Download

MIT

The Development Requires

by Bancu Adrian

mysql backup bancuadrian

04/12 2015

dev-master

9999999-dev

Backup your mysql databases

  Sources   Download

MIT

The Development Requires

by Bancu Adrian

mysql backup bancuadrian

04/12 2015

0.0.3

0.0.3.0

Backup your mysql databases

  Sources   Download

MIT

The Development Requires

by Bancu Adrian

mysql backup bancuadrian

04/12 2015

0.0.2

0.0.2.0

Backup your mysql databases

  Sources   Download

MIT

The Development Requires

by Bancu Adrian

mysql backup bancuadrian

03/12 2015

0.0.1

0.0.1.0

Backup your mysql databases

  Sources   Download

MIT

The Development Requires

by Bancu Adrian

mysql backup bancuadrian