feat: mysql, mariadb

This commit is contained in:
Andras Bacsai
2023-10-24 14:31:28 +02:00
parent b2d111e49a
commit f801bb98cd
41 changed files with 1309 additions and 88 deletions

View File

@@ -8,8 +8,21 @@ class BackupExecutions extends Component
{
public $backup;
public $executions;
protected $listeners = ['refreshBackupExecutions'];
public $setDeletableBackup;
protected $listeners = ['refreshBackupExecutions', 'deleteBackup'];
public function deleteBackup($exeuctionId)
{
$execution = $this->backup->executions()->where('id', $exeuctionId)->first();
if (is_null($execution)) {
$this->emit('error', 'Backup execution not found.');
return;
}
delete_backup_locally($execution->filename, $execution->scheduledDatabaseBackup->database->destination->server);
$execution->delete();
$this->emit('success', 'Backup deleted successfully.');
$this->emit('refreshBackupExecutions');
}
public function refreshBackupExecutions(): void
{
$this->executions = $this->backup->executions;