2017 © Pedro Peláez
 

library phpbu-laravel

Laravel backup package - integrates phpbu with the laravel artisan command line tool

image

phpbu/phpbu-laravel

Laravel backup package - integrates phpbu with the laravel artisan command line tool

  • Monday, May 14, 2018
  • by phpbu
  • Repository
  • 3 Watchers
  • 16 Stars
  • 269 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 9 Versions
  • 23 % Grown

The README.md

phpbu-laravel

Laravel backup package - integrates phpbu with the laravel artisan command line tool., (*1)

A more detailed documentation can be found in the phpbu manual., (*2)

Latest Stable Version License Build Status Scrutinizer Code Quality Code Coverage, (*3)

Features

  • Creating backups
    • Directories
    • MySQL
  • Validate backups
    • Check min size
    • Comparing with previous backups
  • Sync backups to other locations
    • All Laravel filesystems
  • Cleanup your backup location
    • Delete backups older x
    • Store only x MB of backups
    • Keep only last x backups

Requirements

  • PHP 7.0
  • Laravel 5.*
  • phpbu 5.*
  • see phpbu requirements for more details

Installation

Use composer to install the package., (*4)

composer require phpbu/phpbu-laravel

Add the package ServiceProvider to your config/app.php configuration file., (*5)

'providers' => [
    ...
    /*
     * phpbu Backup Service Providers...
     */
    phpbu\Laravel\ServiceProvider::class,
];

Finally create a configuration skeleton by publishing the package., (*6)

php artisan vendor:publish --provider="phpbu\Laravel\ServiceProvider"

Configuration

After publishing the ServiceProvider a phpbu.php configuration file is created in your config directory., (*7)

<?php
return [
    /*
    |--------------------------------------------------------------------------
    | laravel configuration
    |--------------------------------------------------------------------------
    |
    | This is activated as long as you don't specify a phpbu
    | configuration file at the bottom.
    |
    */

    // no directories to backup
    // keep at least the empty array 'directories' => []

    'directories' => [
        [
            'source' => [
                'path'    => storage_path('app'),
                'options' => [],
            ],
            'target' => [
                'dirname'     => storage_path('/backup/app'),
                'filename'    => 'app-%Y%m%d-%H%i.tar',
                'compression' => 'bzip2',
            ],
            'sync' => [
                'filesystem' => 's3',
                'path'       => '/backup/app',
            ]
        ]
    ],

    // no databases to backup
    // keep at least the empty array 'databases' => []

    'databases' => [
        [
            'source' => [
                'connection' => 'mysql',
                'options'    => []
            ],
            'target' => [
                'dirname'     => storage_path('backup/db'),
                'filename'    => 'dump-%Y%m%d-%H%i.sql',
                'compression' => 'bzip2',
            ],
            'sync' => [
                'filesystem' => 's3',
                'path'       => '/backup/db',
            ]
        ],
    ],
    'config' => __FILE__,

    /*
    |--------------------------------------------------------------------------
    | phpbu configuration
    |--------------------------------------------------------------------------
    |
    | Path to a phpbu configuration file.
    | You can use a phpbu.xml or phpbu.json configuration.
    | If you use one of those the configuration above will be ignored.
    | This is deactivated by default so you can setup your backup using
    | the configuration above
    */

    'phpbu' => null,
];

Usage

Show command help information., (*8)

php artisan phpbu:backup --help

Execute the backup,, (*9)

php artisan phpbu:backup

Execute a dry-run without making any changes., (*10)

php artisan phpbu:backup --phpbu-simulate

The Versions

14/05 2018

dev-master

9999999-dev http://phpbu.de/

Laravel backup package - integrates phpbu with the laravel artisan command line tool

  Sources   Download

MIT

The Requires

 

by Sebastian Feldmann

laravel backup

25/10 2017

3.0.0

3.0.0.0 http://phpbu.de/

Laravel backup package - integrates phpbu with the laravel artisan command line tool

  Sources   Download

MIT

The Requires

 

by Sebastian Feldmann

laravel backup

25/11 2016

2.1.0

2.1.0.0 http://phpbu.de/

Laravel backup package - integrates phpbu with the laravel artisan command line tool

  Sources   Download

MIT

The Requires

 

by Sebastian Feldmann

laravel backup

28/02 2016

2.0.0

2.0.0.0 http://phpbu.de/

Laravel backup package - integrates phpbu with the laravel artisan command line tool

  Sources   Download

MIT

The Requires

 

by Sebastian Feldmann

laravel backup

12/02 2016

1.0.1

1.0.1.0 http://phpbu.de/

Laravel backup package - integrates phpbu with the laravel artisan command line tool

  Sources   Download

MIT

The Requires

 

by Sebastian Feldmann

laravel backup

29/06 2015

1.0.0

1.0.0.0 http://phpbu.de/

Laravel backup package - integrates phpbu with the laravel artisan command line tool

  Sources   Download

MIT

The Requires

 

by Sebastian Feldmann

laravel backup

25/06 2015

0.9.3

0.9.3.0 http://phpbu.de/

Laravel backup package - integrates phpbu with the laravel artisan command line tool

  Sources   Download

MIT

The Requires

 

by Sebastian Feldmann

laravel backup

22/06 2015

0.9.2

0.9.2.0 http://phpbu.de/

Laravel backup package - integrates phpbu with the laravel artisan command line tool

  Sources   Download

MIT

The Requires

 

by Sebastian Feldmann

laravel backup

21/06 2015

0.9.1

0.9.1.0 http://phpbu.de/

Laravel backup package - integrates phpbu with the laravel artisan command line tool

  Sources   Download

MIT

The Requires

 

by Sebastian Feldmann

laravel backup