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

View File

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