fix: deletion of single backup
This commit is contained in:
@@ -61,15 +61,19 @@ class BackupExecutions extends Component
|
|||||||
? $execution->scheduledDatabaseBackup->database->service->destination->server
|
? $execution->scheduledDatabaseBackup->database->service->destination->server
|
||||||
: $execution->scheduledDatabaseBackup->database->destination->server;
|
: $execution->scheduledDatabaseBackup->database->destination->server;
|
||||||
|
|
||||||
|
try {
|
||||||
deleteBackupsLocally($execution->filename, $server);
|
deleteBackupsLocally($execution->filename, $server);
|
||||||
|
|
||||||
if ($this->delete_backup_s3 && $execution->scheduledDatabaseBackup->s3) {
|
if ($this->delete_backup_s3 && $execution->scheduledDatabaseBackup->s3) {
|
||||||
deleteBackupsS3($execution->filename, $server, $execution->scheduledDatabaseBackup->s3);
|
deleteBackupsS3($execution->filename, $execution->scheduledDatabaseBackup->s3);
|
||||||
}
|
}
|
||||||
|
|
||||||
$execution->delete();
|
$execution->delete();
|
||||||
$this->dispatch('success', 'Backup deleted.');
|
$this->dispatch('success', 'Backup deleted.');
|
||||||
$this->refreshBackupExecutions();
|
$this->refreshBackupExecutions();
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
$this->dispatch('error', 'Failed to delete backup: '.$e->getMessage());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function download_file($exeuctionId)
|
public function download_file($exeuctionId)
|
||||||
|
|||||||
Reference in New Issue
Block a user