2017 © Pedro Peláez
 

library backup

Backup and restore database support for Laravel 4 applications

image

schickling/backup

Backup and restore database support for Laravel 4 applications

  • Sunday, December 14, 2014
  • by schickling
  • Repository
  • 19 Watchers
  • 361 Stars
  • 88,797 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 56 Forks
  • 23 Open issues
  • 9 Versions
  • 2 % Grown

The README.md

laravel-backup Build Status Coverage Status Total Downloads

Backup and restore database support for Laravel 4 applications, (*1)

Installation

  1. Run the following command:
$ composer require schickling/backup
  1. Add Schickling\Backup\BackupServiceProvider to your config/app.php

Usage

Backup

Creates a dump file in app/storage/dumps, (*2)

$ php artisan db:backup
Use specific database
$ php artisan db:backup --database=mysql
Upload to AWS S3
$ php artisan db:backup --upload-s3 your-bucket

You can use the --keep-only-s3 option if you don't want to keep a local copy of the SQL dump., (*3)

Uses the aws/aws-sdk-php-laravel package which needs to be configured., (*4)

Restore

Paths are relative to the app/storage/dumps folder., (*5)

Restore a dump
$ php artisan db:restore dump.sql
List dumps
$ php artisan db:restore

Configuration

Since version 0.5.0 this package follows the recommended standard for configuration. In order to configure this package please run the following command:, (*6)

$ php artisan config:publish schickling/backup

All settings are optional and have reasonable default values., (*7)


return array( // add a backup folder in the app/database/ or your dump folder 'path' => app_path() . '/database/backup/', // add the path to the restore and backup command of mysql // this exemple is if your are using MAMP server on a mac // on windows: 'C:\\...\\mysql\\bin\\' // on linux: '/usr/bin/' // trailing slash is required 'mysql' => array( 'dump_command_path' => '/Applications/MAMP/Library/bin/', 'restore_command_path' => '/Applications/MAMP/Library/bin/', ), // s3 settings 's3' => array( 'path' => 'your/s3/dump/folder' ) // Use GZIP compression 'compress' => false, );

Dependencies

...for MySQL

You need to have mysqldump installed. It's usually already installed with MySQL itself., (*8)

TODO - Upcoming Features

  • db:restore WRONGFILENAME more detailed error message
  • db:backup FILENAME set title for dump
  • S3
    • Upload as default
    • default bucket
  • More detailed folder checking (permission, existence, ...)
  • Some more ideas? Tell me!

Bitdeli Badge, (*9)

The Versions

14/12 2014

dev-master

9999999-dev

Backup and restore database support for Laravel 4 applications

  Sources   Download

The Requires

 

The Development Requires

by Johannes Schickling

14/12 2014

0.6.0

0.6.0.0

Backup and restore database support for Laravel 4 applications

  Sources   Download

The Requires

 

The Development Requires

by Johannes Schickling

30/10 2014

0.5.1

0.5.1.0

Backup and restore database support for Laravel 4 applications

  Sources   Download

The Requires

 

The Development Requires

by Johannes Schickling

19/05 2014

0.5.0

0.5.0.0

Backup and restore database support for Laravel 4 applications

  Sources   Download

The Requires

 

The Development Requires

by Johannes Schickling

14/12 2013

0.4.1

0.4.1.0

Backup and restore database support for Laravel 4 applications

  Sources   Download

The Requires

 

The Development Requires

by Johannes Schickling

19/07 2013

0.4

0.4.0.0

Backup and restore database support for Laravel 4 applications

  Sources   Download

The Requires

 

The Development Requires

by Johannes Schickling

12/07 2013

0.3.2

0.3.2.0

Backup and restore database support for Laravel 4 applications

  Sources   Download

The Requires

 

The Development Requires

by Johannes Schickling

03/07 2013

0.3.1

0.3.1.0

Backup and restore database support for Laravel 4 applications

  Sources   Download

The Requires

  • php >=5.3.0

 

The Development Requires

by Johannes Schickling

02/07 2013

0.3.0

0.3.0.0

Backup and restore database support for Laravel 4 applications

  Sources   Download

The Requires

  • php >=5.3.0

 

The Development Requires

by Johannes Schickling