feat(backups): support scheduled backups for application storage targets

Add polymorphic volume backup scheduling for persistent volumes and directories, expose schedule management via API, and reorganize backup configuration and execution views.
This commit is contained in:
Andras Bacsai committed 2026-07-15 17:34:22 +02:00
1 parent 995ec5fbb6
commit d7385ad0c4
60 files changed
+3570 -985

No files matched your search

+4 -3
View File
@@ -356,7 +356,7 @@ class ScheduledJobManager implements ShouldQueue
private function processScheduledVolumeBackups(): void
{
ScheduledVolumeBackup::query()
->with(['volume', 'team.subscription'])
->with(['backupable', 'team.subscription'])
->where('enabled', true)
->chunkById(self::CHUNK_SIZE, function ($backups): void {
foreach ($backups as $backup) {
@@ -397,7 +397,7 @@ class ScheduledJobManager implements ShouldQueue
return;
}
if (! $backup->volume || ! $server) {
if (! $backup->backupable || ! $server) {
$backup->delete();
$this->skippedCount++;
$this->logSkip('volume_backup', 'resource_deleted', [
@@ -435,7 +435,8 @@ class ScheduledJobManager implements ShouldQueue
$this->dispatchedCount++;
Log::channel('scheduled')->info('Volume backup dispatched', [
'backup_id' => $backup->id,
'volume_id' => $backup->local_persistent_volume_id,
'backupable_type' => $backup->backupable_type,
'backupable_id' => $backup->backupable_id,
'team_id' => $backup->team_id,
'server_id' => $server->id,
]);