-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from ARCANEDEV/develop
Starting Laravel v8 support
- Loading branch information
Showing
120 changed files
with
438 additions
and
314 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
- LaravelBackup Version: #.#.# | ||
- Laravel Version: #.#.# | ||
- PHP Version: #.#.# | ||
|
||
### Description: | ||
|
||
### Steps To Reproduce: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,9 @@ | |
| ----------------------------------------------------------------- | ||
*/ | ||
|
||
/* | ||
* The name of this application. You can use this name to monitor the backups. | ||
*/ | ||
'name' => env('APP_NAME', 'laravel-backup'), | ||
|
||
/* ----------------------------------------------------------------- | ||
|
@@ -16,8 +19,10 @@ | |
|
||
'destination' => [ | ||
|
||
// The filename prefix used for the backup zip file. | ||
'filename-prefix' => '', | ||
|
||
// The disk names on which the backups will be stored. | ||
'disks' => [ | ||
'local', | ||
], | ||
|
@@ -32,24 +37,82 @@ | |
'backup' => [ | ||
|
||
'source' => [ | ||
|
||
'files' => [ | ||
|
||
// The list of directories and files that will be included in the backup. | ||
'include' => [ | ||
base_path(), | ||
], | ||
|
||
/* | ||
* These directories and files will be excluded from the backup. | ||
* | ||
* Directories used by the backup process will automatically be excluded. | ||
*/ | ||
'exclude' => [ | ||
base_path('vendor'), | ||
base_path('node_modules'), | ||
], | ||
|
||
// Determines if symlinks should be followed. | ||
'follow-links' => false, | ||
|
||
// Determines if it should avoid unreadable folders. | ||
'ignore-unreadable-directories' => false, | ||
|
||
], | ||
|
||
/* | ||
* The names of the connections to the databases that should be backed up | ||
* MySQL, PostgreSQL, SQLite and Mongo databases are supported. | ||
* | ||
* The content of the database dump may be customized for each connection | ||
* by adding a 'dump' key to the connection settings in config/database.php. | ||
* E.g. | ||
* 'mysql' => [ | ||
* ... | ||
* 'dump' => [ | ||
* 'excludeTables' => [ | ||
* 'table_to_exclude_from_backup', | ||
* 'another_table_to_exclude' | ||
* ] | ||
* ], | ||
* ], | ||
* | ||
* If you are using only InnoDB tables on a MySQL server, you can | ||
* also supply the useSingleTransaction option to avoid table locking. | ||
* | ||
* E.g. | ||
* 'mysql' => [ | ||
* ... | ||
* 'dump' => [ | ||
* 'useSingleTransaction' => true, | ||
* ], | ||
* ], | ||
* | ||
* For a complete list of available customization options, see https://github.com/spatie/db-dumper | ||
*/ | ||
'databases' => [ | ||
'mysql', | ||
], | ||
|
||
], | ||
|
||
/* | ||
* The database dump can be compressed to decrease disk space usage. | ||
* | ||
* Out of the box LaravelBackup supplies: | ||
* Arcanedev\LaravelBackup\Database\Compressors\GzipCompressor::class | ||
* | ||
* You can also use a custom compressor by implementing the contract: | ||
* Arcanedev\LaravelBackup\Database\Contracts\Compressor | ||
* | ||
* If you do not want any compressor at all, set it to `null`. | ||
*/ | ||
'db-dump-compressor' => null, | ||
|
||
// The directory where the temporary files will be stored. | ||
'temporary-directory' => storage_path('app/_backup-temp'), | ||
|
||
'tasks' => [ | ||
|
@@ -68,41 +131,36 @@ | |
| ----------------------------------------------------------------- | ||
*/ | ||
|
||
/* | ||
* The strategy that will be used to cleanup old backups. The default strategy will keep all backups | ||
* for a certain amount of days. After that period only a daily backup will be kept. | ||
* After that period only weekly backups will be kept and so on. | ||
* | ||
* No matter how you configure it the default strategy will never delete the newest backup. | ||
*/ | ||
'cleanup' => [ | ||
|
||
'strategy' => [ | ||
'default' => Arcanedev\LaravelBackup\Actions\Cleanup\Strategies\DefaultStrategy::class, | ||
|
||
'keep-backups' => [ | ||
/** | ||
* The number of days for which backups must be kept. | ||
*/ | ||
// The number of days for which backups must be kept. | ||
'all' => 7, | ||
|
||
/** | ||
* The number of days for which daily backups must be kept. | ||
*/ | ||
// The number of days for which daily backups must be kept. | ||
'daily' => 16, | ||
|
||
/** | ||
* The number of weeks for which one weekly backup must be kept. | ||
*/ | ||
// The number of weeks for which one weekly backup must be kept. | ||
'weekly' => 8, | ||
|
||
/** | ||
* The number of months for which one monthly backup must be kept. | ||
*/ | ||
// The number of months for which one monthly backup must be kept. | ||
'monthly' => 4, | ||
|
||
/** | ||
* The number of years for which one yearly backup must be kept. | ||
*/ | ||
// The number of years for which one yearly backup must be kept. | ||
'yearly' => 2, | ||
], | ||
|
||
/* | ||
* After cleaning up the backups remove the oldest backup until this amount of megabytes has been reached. | ||
*/ | ||
// After cleaning up the backups remove the oldest backup until this amount of megabytes has been reached. | ||
'delete-backups' => [ | ||
'oldest-when-size-reach' => 5000, | ||
], | ||
|
@@ -120,6 +178,10 @@ | |
| ----------------------------------------------------------------- | ||
*/ | ||
|
||
/* | ||
* Here you can specify which backups should be monitored. | ||
* If a backup does not meet the specified requirements the UnhealthyBackupsWasFound event will be fired. | ||
*/ | ||
'monitor' => [ | ||
|
||
'destinations' => [ | ||
|
@@ -155,6 +217,14 @@ | |
| ----------------------------------------------------------------- | ||
*/ | ||
|
||
/* | ||
* You can get notified when specific events occur. Out of the box you can use 'mail' and 'slack'. | ||
* | ||
* For 'slack' you need to install 'laravel/slack-notification-channel'. | ||
* | ||
* You can also use your own notification classes, just make sure the class is named after one of | ||
* the `Arcanedev\LaravelBackup\Events` classes. | ||
*/ | ||
'notifications' => [ | ||
|
||
'supported' => [ | ||
|
@@ -176,6 +246,7 @@ | |
|
||
'mail' => [ | ||
'to' => '[email protected]', | ||
|
||
'from' => [ | ||
'address' => env('MAIL_FROM_ADDRESS', '[email protected]'), | ||
'name' => env('MAIL_FROM_NAME', 'Example'), | ||
|
@@ -185,7 +256,7 @@ | |
'slack' => [ | ||
'webhook_url' => '', | ||
|
||
/* If this is set to null the default channel of the webhook will be used. */ | ||
// If this is set to null the default channel of the webhook will be used. | ||
'channel' => null, | ||
'username' => null, | ||
'icon' => null, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ | |
/** | ||
* Class Action | ||
* | ||
* @package Arcanedev\LaravelBackup\Actions | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
abstract class Action extends Pipeline | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
/** | ||
* Class BackupAction | ||
* | ||
* @package Arcanedev\LaravelBackup\Actions\Backup | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
class BackupAction extends Action | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
/** | ||
* Class BackupPassable | ||
* | ||
* @package Arcanedev\LaravelBackup\Actions\Backup | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
class BackupPassable extends Passable | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
/** | ||
* Class CheckBackupDestinations | ||
* | ||
* @package Arcanedev\LaravelBackup\Actions\Backup\Tasks | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
class CheckBackupDestinations implements TaskInterface | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ | |
/** | ||
* Class CheckOptions | ||
* | ||
* @package Arcanedev\LaravelBackup\Actions\Backup\Tasks | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
class CheckOptions implements TaskInterface | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
namespace Arcanedev\LaravelBackup\Actions\Backup\Tasks; | ||
|
||
use Arcanedev\LaravelBackup\Actions\TaskInterface; | ||
use Arcanedev\LaravelBackup\Entities\Manifest; | ||
use Arcanedev\LaravelBackup\Entities\{Backup, Manifest}; | ||
use Arcanedev\LaravelBackup\Events\BackupZipWasCreated; | ||
use Arcanedev\LaravelBackup\Helpers\Zip; | ||
use Closure; | ||
|
@@ -14,7 +14,6 @@ | |
/** | ||
* Class CreateBackupFile | ||
* | ||
* @package Arcanedev\LaravelBackup\Actions\Backup\Tasks | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
class CreateBackupFile implements TaskInterface | ||
|
@@ -77,6 +76,6 @@ protected static function createZipFile(Manifest $manifest, string $path): Zip | |
*/ | ||
protected static function getFilename(): string | ||
{ | ||
return Carbon::now()->format('Ymd-His').'.zip'; | ||
return Carbon::now()->format(Backup::FILENAME_FORMAT); | ||
} | ||
} |
Oops, something went wrong.