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:inventory-alerts')->daily();
$schedule->command('snipeit:expiring-alerts')->daily(); $schedule->command('snipeit:expiring-alerts')->daily();
$schedule->command('snipeit:backup')->weekly(); $schedule->command('snipeit:backup')->weekly();
$schedule->command('backup:clean')->daily();
} }
} }

View file

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

View file

@ -2,6 +2,14 @@
return [ return [
'backup' => [
/*
* The name of this application. You can use this name to monitor
* the backups.
*/
'name' => env('APP_URL'),
'source' => [ 'source' => [
'files' => [ 'files' => [
@ -11,9 +19,9 @@ return [
* specify individual files as well. * specify individual files as well.
*/ */
'include' => [ 'include' => [
'public/uploads', base_path('public/uploads'),
'config', base_path('config'),
'app/storage/private_uploads', base_path('storage/private_uploads'),
], ],
/* /*
@ -22,89 +30,150 @@ return [
*/ */
'exclude' => [ 'exclude' => [
base_path('vendor'), 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' => [ 'destination' => [
/* /*
* The filesystem(s) you on which the backups will be stored. Choose one or more * The disk names on which the backups will be stored.
* of the filesystems you configured in app/config/filesystems.php
*/ */
'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 * The amount of days that all daily backups must be kept.
* is relative to the root you configured on your chosen */
* filesystem(s). '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 * Slack requires the installation of the maknz/slack package.
* be automatically placed in this directory so you don't
* accidentally end up committing these backups.
*/ */
'path' => 'backups', 'events' => [
'whenBackupWasSuccessful' => ['log'],
/* 'whenCleanupWasSuccessful' => ['log'],
* By default the backups will be stored as a zipfile with a 'whenHealthyBackupWasFound' => ['log'],
* timestamp as the filename. With these options You can 'whenBackupHasFailed' => ['log', 'mail'],
* specify a prefix and a suffix for the filename. 'whenCleanupHasFailed' => ['log', 'mail'],
*/ 'whenUnhealthyBackupWasFound' => ['log', 'mail'],
'prefix' => 'backup-',
'suffix' => '',
], ],
'clean' => [
/* /*
* The clean command will remove all backups on all configured filesystems * Here you can specify how emails should be sent.
* that are older then this amount of days.
*/ */
'maxAgeInDays' => 90, 'mail' => [
'from' => 'your@email.com',
'to' => 'your@email.com',
], ],
'mysql' => [
/* /*
* The path to the mysqldump binary. You can leave this empty * Here you can specify how messages should be sent to Slack.
* if the binary is installed in the default location.
*/ */
'dump_command_path' => '', 'slack' => [
'channel' => '#backups',
/* 'username' => 'Backup bot',
* If your server supports it you can turn on extended insert. 'icon' => ':robot:',
* 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,
], ],
'pgsql' => [
/* /*
* The path to the pg_dump binary. You can leave this empty * Here you can specify how messages should be sent to Pushover.
* if the binary is installed in the default location.
*/ */
'dump_command_path' => '', 'pushover' => [
'token' => env('PUSHOVER_APP_TOKEN'),
/* 'user' => env('PUSHOVER_USER_KEY'),
* Set to true to use pgsql 'COPY' statements instead of 'INSERT's. 'sounds' => [
*/ 'success' => env('PUSHOVER_SOUND_SUCCESS','pushover'),
'use_copy' => true, 'error' => env('PUSHOVER_SOUND_ERROR','siren'),
/*
* If the dump of the db takes more seconds that the specified value,
* it will abort the backup.
*/
'timeoutInSeconds' => 60,
], ],
],
]
]; ];