hardcode for db:backup parameters that is ran when installing cachet

Future improvements should dynamically configure the databases used
This commit is contained in:
Nico Stapelbroek
2018-07-02 12:35:01 +02:00
parent c165c0be57
commit 65f138dc2d
2 changed files with 3 additions and 7 deletions

View File

@@ -15,7 +15,6 @@ use CachetHQ\Cachet\Bus\Events\System\SystemWasInstalledEvent;
use CachetHQ\Cachet\Bus\Events\System\SystemWasResetEvent;
use CachetHQ\Cachet\Bus\Events\System\SystemWasUpdatedEvent;
use CachetHQ\Cachet\Settings\Cache;
use Carbon\Carbon;
use Exception;
use Illuminate\Console\Command;
use Illuminate\Contracts\Config\Repository;
@@ -153,11 +152,8 @@ class CommandSubscriber
$command->line('Backing up database...');
try {
$command->call('db:backup', [
'--compression' => 'gzip',
'--database' => $this->config->get('database.default'),
'--destination' => 'local',
'--destinationPath' => Carbon::now()->format('Y-m-d H.i.s'),
$command->call('backup:run', [
'--only-db' => true,
'--no-interaction' => true,
]);
} catch (Exception $e) {

View File

@@ -132,7 +132,7 @@ return [
'monitorBackups' => [
[
'name' => config('app.name'),
'disks' => ['local'],
'disks' => ['database'],
'newestBackupsShouldNotBeOlderThanDays' => 1,
'storageUsedMayNotBeHigherThanMegabytes' => 5000,
],