Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Simple laravel package to backup/restore files and database.

License

NotificationsYou must be signed in to change notification settings

sarfraznawaz2005/backupmanager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Latest Version on PackagistTotal Downloads

Laravel BackupManager

Simple laravel package to backup/restore files and database.

Screenshot

Main Window

Requirements

  • PHP >= 5.6
  • = Laravel 5

  • mysql (to restore database)
  • mysqldump (to backup database)
  • tar (to backup/restore files)
  • zcat (to extract database archive)

Please make sure above binaries are added toPATH environment variable or you can specify full path to them in config file.

Installation

Via Composer

$ composer require sarfraznawaz2005/backupmanager

For Laravel < 5.5:

Add Service Provider toconfig/app.php inproviders section:

Sarfraznawaz2005\BackupManager\ServiceProvider::class,

(Optional) Add Facade toconfig/app.php inaliases section:

'BackupManager' =>Sarfraznawaz2005\BackupManager\Facades\BackupManager::class,

Publish package's files by running below command:

$ php artisan vendor:publish --provider="Sarfraznawaz2005\BackupManager\ServiceProvider"

It should publishconfig/backupmanager.php.php config file and migration file.

Runphp artisan migrate to create backup verifier (verifybackup)) table.


Finally setup options inconfig/backupmanager.php file and open the backup manager at url you have specified inroute option eghttp//yourapp.com/backupmanager, you should now see interface of BackupManager.

Seeconfig/backupmanager.php file for more information about backup settings.

Setting Up Automatic Backups

To setup automatic backups, place following inapp/Console/Kernel.php file:

$schedule->command('backupmanager:create')->daily();

Although packages provides GUI interface to manage backups, following commands are also available:

  backupmanager:create                  Creates backup of files and/or database.  backupmanager:create --only="db"      Creates backup of database only.  backupmanager:create --only="files"   Creates backup of files only.  backupmanager:list                    Shows list of backups taken.  backupmanager:restore                 Restores a backup already taken.

Saving Backups to Other Disks

By default this package saves backups tolocal disk but you can use built-in feature of laravel filesystem to save backups to other disks too. Let's say you want to upload to different server for which you have ftp credentials, you need to update those ftp credentials into laravel'sconfig/filesystems.php file underftp disk setting. Once you have done that, in backup manager config file (config/backupmanager.php) specify your disk to beftp instead oflocal eg:

// define disk options'disk' => 'ftp',

instead of

 'disk' => 'local',

Now backup files will be saved on your ftp location instead of locally.

How Restore is verified

Even though there is no 100% way to verify restores, yet forfiles we create and verify restore feature by putting some contents intobackup-verify file before and after restore. Similarly, we verifydatabase restore by putting some contents intoverifybackup table before and after restore. In both cases, contents of that file and database table are different at the time of backup and restore.

Disclaimer

This package was created for our needs and works for us however no guarantee is provided in terms of its functionality especially restore feature which can not be 100% verified because of the way restore feature works. So use this package at your own risk.

Credits

License

Please see thelicense file for more information.

About

Simple laravel package to backup/restore files and database.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp