Updated laravel-backup package

Files are still not being generated. Open a ticket with the package maintainer
This commit is contained in:
snipe 2016-05-12 16:54:07 -07:00
parent 1773f671da
commit 9cfde523b0
4 changed files with 158 additions and 88 deletions

View file

@ -37,5 +37,6 @@ class Kernel extends ConsoleKernel
$schedule->command('snipeit:inventory-alerts')->daily();
$schedule->command('snipeit:expiring-alerts')->daily();
$schedule->command('snipeit:backup')->weekly();
$schedule->command('backup:clean')->daily();
}
}

View file

@ -21,7 +21,7 @@
"doctrine/common": "v2.5.3",
"doctrine/dbal": "v2.4.2",
"barryvdh/laravel-debugbar": "^2.1",
"spatie/laravel-backup": "3.0"
"spatie/laravel-backup": "^3.7"
},
"require-dev": {
"fzaninotto/faker": "~1.4",

16
composer.lock generated
View file

@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "12b97719862dc701bb0c465f434db081",
"content-hash": "7e60a755ea83a5007fa6906346c00cc8",
"hash": "abd2bfc01b3565b7dd1f6aac9e9311b1",
"content-hash": "21294a0f9fd03e194e64084844a1d380",
"packages": [
{
"name": "aws/aws-sdk-php",
@ -2324,16 +2324,16 @@
},
{
"name": "spatie/laravel-backup",
"version": "3.0.0",
"version": "3.7.0",
"source": {
"type": "git",
"url": "https://github.com/spatie/laravel-backup.git",
"reference": "1937f83d663257d1066d843cc3b634751bc98cf6"
"reference": "d41a03bae8f2b3555f9d77bd6f89133e76c2bcd2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/spatie/laravel-backup/zipball/1937f83d663257d1066d843cc3b634751bc98cf6",
"reference": "1937f83d663257d1066d843cc3b634751bc98cf6",
"url": "https://api.github.com/repos/spatie/laravel-backup/zipball/d41a03bae8f2b3555f9d77bd6f89133e76c2bcd2",
"reference": "d41a03bae8f2b3555f9d77bd6f89133e76c2bcd2",
"shasum": ""
},
"require": {
@ -2342,7 +2342,7 @@
"illuminate/support": "^5.1",
"league/flysystem": "^1.0.8",
"php": "^5.5|^7.0",
"spatie/db-dumper": "^1.1.0",
"spatie/db-dumper": "^1.3",
"symfony/finder": "^2.7|^3.0"
},
"require-dev": {
@ -2382,7 +2382,7 @@
"laravel-backup",
"spatie"
],
"time": "2016-03-07 18:32:17"
"time": "2016-05-12 13:34:22"
},
{
"name": "swiftmailer/swiftmailer",

View file

@ -2,6 +2,14 @@
return [
'backup' => [
/*
* The name of this application. You can use this name to monitor
* the backups.
*/
'name' => env('APP_URL'),
'source' => [
'files' => [
@ -11,9 +19,9 @@ return [
* specify individual files as well.
*/
'include' => [
'public/uploads',
'config',
'app/storage/private_uploads',
base_path('public/uploads'),
base_path('config'),
base_path('storage/private_uploads'),
],
/*
@ -22,89 +30,150 @@ return [
*/
'exclude' => [
base_path('vendor'),
],
base_path('node_modules'),
],
/*
* Should the database be part of the back up.
* Determines if symlinks should be followed.
*/
'backup-db' => true,
'followLinks' => false,
],
/*
* The names of the connections to the databases that should be part of the backup.
* Currently only MySQL- and PostgreSQL-databases are supported.
*/
'databases' => [
'mysql',
],
],
'destination' => [
/*
* The filesystem(s) you on which the backups will be stored. Choose one or more
* of the filesystems you configured in app/config/filesystems.php
* The disk names on which the backups will be stored.
*/
'filesystem' => ['local'],
'disks' => [
'local',
],
],
],
'cleanup' => [
/*
* The strategy that will be used to cleanup old backups.
* The youngest backup will never be deleted.
*/
'strategy' => \Spatie\Backup\Tasks\Cleanup\Strategies\DefaultStrategy::class,
'defaultStrategy' => [
/*
* The path where the backups will be saved. This path
* is relative to the root you configured on your chosen
* filesystem(s).
* The amount of days that all daily backups must be kept.
*/
'keepAllBackupsForDays' => 7,
/*
* The amount of days that all daily backups must be kept.
*/
'keepDailyBackupsForDays' => 16,
/*
* The amount of weeks of which one weekly backup must be kept.
*/
'keepWeeklyBackupsForWeeks' => 8,
/*
* The amount of months of which one monthly backup must be kept.
*/
'keepMonthlyBackupsForMonths' => 4,
/*
* The amount of years of which one yearly backup must be kept
*/
'keepYearlyBackupsForYears' => 2,
/*
* After cleaning up the backups remove the oldest backup until
* this amount of megabytes has been reached.
*/
'deleteOldestBackupsWhenUsingMoreMegabytesThan' => 5000
]
],
/*
* In this array you can specify which backups should be monitored.
* If a backup does not meet the specified requirements the
* UnHealthyBackupWasFound-event will be fired.
*/
'monitorBackups' => [
[
'name' => env('APP_URL'),
'disks' => ['local'],
'newestBackupsShouldNotBeOlderThanDays' => 1,
'storageUsedMayNotBeHigherThanMegabytes' => 5000,
],
/*
[
'name' => 'name of the second app',
'disks' => ['local', 's3'],
'newestBackupsShouldNotBeOlderThanDays' => 1,
'storageUsedMayNotBeHigherThanMegabytes' => 5000,
],
*/
],
'notifications' => [
/*
* This class will be used to send all notifications.
*/
'handler' => Spatie\Backup\Notifications\Notifier::class,
/*
* Here you can specify the ways you want to be notified when certain
* events take place. Possible values are "log", "mail", "slack" and "pushover".
*
* If you're using the local filesystem a .gitignore file will
* be automatically placed in this directory so you don't
* accidentally end up committing these backups.
* Slack requires the installation of the maknz/slack package.
*/
'path' => 'backups',
/*
* By default the backups will be stored as a zipfile with a
* timestamp as the filename. With these options You can
* specify a prefix and a suffix for the filename.
*/
'prefix' => 'backup-',
'suffix' => '',
'events' => [
'whenBackupWasSuccessful' => ['log'],
'whenCleanupWasSuccessful' => ['log'],
'whenHealthyBackupWasFound' => ['log'],
'whenBackupHasFailed' => ['log', 'mail'],
'whenCleanupHasFailed' => ['log', 'mail'],
'whenUnhealthyBackupWasFound' => ['log', 'mail'],
],
'clean' => [
/*
* The clean command will remove all backups on all configured filesystems
* that are older then this amount of days.
* Here you can specify how emails should be sent.
*/
'maxAgeInDays' => 90,
'mail' => [
'from' => 'your@email.com',
'to' => 'your@email.com',
],
'mysql' => [
/*
* The path to the mysqldump binary. You can leave this empty
* if the binary is installed in the default location.
* Here you can specify how messages should be sent to Slack.
*/
'dump_command_path' => '',
/*
* If your server supports it you can turn on extended insert.
* This will result in a smaller dump file and speeds up the backup process.
*
* See: https://dev.mysql.com/doc/refman/5.1/en/mysqldump.html#option_mysqldump_extended-insert
*/
'useExtendedInsert' => false,
/*
* If the dump of the db takes more seconds that the specified value,
* it will abort the backup.
*/
'timeoutInSeconds' => 60,
'slack' => [
'channel' => '#backups',
'username' => 'Backup bot',
'icon' => ':robot:',
],
'pgsql' => [
/*
* The path to the pg_dump binary. You can leave this empty
* if the binary is installed in the default location.
* Here you can specify how messages should be sent to Pushover.
*/
'dump_command_path' => '',
/*
* Set to true to use pgsql 'COPY' statements instead of 'INSERT's.
*/
'use_copy' => true,
/*
* If the dump of the db takes more seconds that the specified value,
* it will abort the backup.
*/
'timeoutInSeconds' => 60,
'pushover' => [
'token' => env('PUSHOVER_APP_TOKEN'),
'user' => env('PUSHOVER_USER_KEY'),
'sounds' => [
'success' => env('PUSHOVER_SOUND_SUCCESS','pushover'),
'error' => env('PUSHOVER_SOUND_ERROR','siren'),
],
],
]
];