lasthourcloud/resources/views/livewire/project/database/backup-edit.blade.php

54 lines
3.1 KiB
PHP
Raw Normal View History

2023-12-07 18:06:32 +00:00
<form wire:submit="submit">
<div class="flex gap-2 pb-2">
<h2>Scheduled Backup</h2>
<x-forms.button type="submit">
Save
</x-forms.button>
2023-10-10 11:10:43 +00:00
@if (Str::of($status)->startsWith('running'))
<livewire:project.database.backup-now :backup="$backup" />
@endif
2023-08-11 14:13:53 +00:00
@if ($backup->database_id !== 0)
<x-forms.button isError wire:click="delete">Delete</x-forms.button>
@endif
</div>
2023-08-11 14:13:53 +00:00
<div class="w-32 pb-2">
2023-08-11 18:19:42 +00:00
<x-forms.checkbox instantSave label="Backup Enabled" id="backup.enabled" />
<x-forms.checkbox instantSave label="S3 Enabled" id="backup.save_s3" />
</div>
2023-08-11 18:19:42 +00:00
@if ($backup->save_s3)
2023-08-11 14:13:53 +00:00
<div class="pb-6">
<x-forms.select id="backup.s3_storage_id" label="S3 Storage" required>
2023-10-09 18:37:42 +00:00
<option value="default">Select a S3 storage</option>
2023-08-11 18:19:42 +00:00
@foreach ($s3s as $s3)
2023-08-11 14:13:53 +00:00
<option value="{{ $s3->id }}">{{ $s3->name }}</option>
@endforeach
</x-forms.select>
</div>
@endif
2023-10-19 15:17:38 +00:00
<div class="flex flex-col gap-2">
<div class="flex gap-2">
2023-10-20 07:38:21 +00:00
@if ($backup->database_type === 'App\Models\StandalonePostgresql')
2023-10-19 15:17:38 +00:00
<x-forms.input label="Databases To Backup"
helper="Comma separated list of databases to backup. Empty will include the default one."
id="backup.databases_to_backup" />
@elseif($backup->database_type === 'App\Models\StandaloneMongodb')
<x-forms.input label="Databases To Include"
helper="A list of databases to backup. You can specify which collection(s) per database to exclude from the backup. Empty will include all databases and collections.<br><br>Example:<br><br>database1:collection1,collection2|database2:collection3,collection4<br><br> database1 will include all collections except collection1 and collection2. <br>database2 will include all collections except collection3 and collection4.<br><br>Another Example:<br><br>database1:collection1|database2<br><br> database1 will include all collections except collection1.<br>database2 will include ALL collections."
id="backup.databases_to_backup" />
2023-10-24 12:31:28 +00:00
@elseif($backup->database_type === 'App\Models\StandaloneMysql')
<x-forms.input label="Databases To Backup"
helper="Comma separated list of databases to backup. Empty will include the default one."
id="backup.databases_to_backup" />
@elseif($backup->database_type === 'App\Models\StandaloneMariadb')
<x-forms.input label="Databases To Backup"
helper="Comma separated list of databases to backup. Empty will include the default one."
id="backup.databases_to_backup" />
2023-10-19 15:17:38 +00:00
@endif
</div>
<div class="flex gap-2">
<x-forms.input label="Frequency" id="backup.frequency" />
<x-forms.input label="Number of backups to keep (locally)" id="backup.number_of_backups_locally" />
</div>
</div>
</form>