fix(backups): redirect to executions after manual backup queueing

Queue manual database and volume backups before redirecting to their execution views, including schedules with unusable S3 storage.
This commit is contained in:
Andras Bacsai committed 2026-07-15 17:39:48 +02:00
1 parent d7385ad0c4
commit 41eee14bd3
4 files changed
+111 -7

No files matched your search

@@ -178,21 +178,28 @@ class VolumeBackups extends Component
$this->dispatch('success', $this->enabled ? 'Storage backups enabled.' : 'Storage backups disabled.');
}
public function backupNow(): void
public function backupNow()
{
$this->authorize('update', $this->resource);
if (! $this->validateSettings()) {
return;
}
if (! $this->backup) {
if (! $this->validateSettings()) {
return;
}
$this->enabled = false;
$this->backup = $this->persistBackup(false);
}
$this->backup = $this->persistBackup($this->enabled);
VolumeBackupJob::dispatch($this->backup);
$this->dispatch('success', 'Storage backup queued.');
return redirect()->route('project.application.backup.executions', [
'project_uuid' => $this->resource->project()->uuid,
'environment_uuid' => $this->resource->environment->uuid,
'application_uuid' => $this->resource->uuid,
'backup_uuid' => $this->backup->uuid,
]);
}
public function delete(?string $password = null, array $selectedActions = [])