| Package Data | |
|---|---|
| Maintainer Username: | phpbu |
| Maintainer Contact: | sebastian@phpbu.de (Sebastian Feldmann) |
| Package Create Date: | 2015-05-18 |
| Package Last Update: | 2023-03-01 |
| Home Page: | http://phpbu.de |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-25 15:01:23 |
| Package Statistics | |
|---|---|
| Total Downloads: | 6,050 |
| Monthly Downloads: | 7 |
| Daily Downloads: | 0 |
| Total Stars: | 19 |
| Total Watchers: | 2 |
| Total Forks: | 3 |
| Total Open Issues: | 1 |
Laravel backup package - integrates phpbu with the laravel artisan command line tool.
A more detailed documentation can be found in the phpbu manual.
Use composer to install the package.
composer require phpbu/phpbu-laravel
Add the package ServiceProvider to your config/app.php configuration file.
'providers' => [
...
/*
* phpbu Backup Service Providers...
*/
phpbu\Laravel\ServiceProvider::class,
];
Finally create a configuration skeleton by publishing the package.
php artisan vendor:publish --provider="phpbu\Laravel\ServiceProvider"
After publishing the ServiceProvider a phpbu.php configuration file is created in your config directory.
<?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,
];
Show command help information.
php artisan phpbu:backup --help
Execute the backup,
php artisan phpbu:backup
Execute a dry-run without making any changes.
php artisan phpbu:backup --phpbu-simulate