@isset($backup)

Executions ({{ $executions_count }})

@if ($executions_count > 0)
Page {{ $currentPage }} of {{ ceil($executions_count / $defaultTake) }}
@endif Cleanup Failed Backups
@forelse($executions as $execution)
data_get($execution, 'status') === 'running', 'border-error' => data_get($execution, 'status') === 'failed', 'border-success' => data_get($execution, 'status') === 'success', ])> @if (data_get($execution, 'status') === 'running')
@endif
data_get($execution, 'status') === 'running', 'bg-red-100 text-red-800 dark:bg-red-900/30 dark:text-red-200 dark:shadow-red-900/5' => data_get($execution, 'status') === 'failed', 'bg-amber-100 text-amber-800 dark:bg-amber-900/30 dark:text-amber-200 dark:shadow-amber-900/5' => data_get($execution, 'status') === 'success' && data_get($execution, 's3_uploaded') === false, 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-200 dark:shadow-green-900/5' => data_get($execution, 'status') === 'success' && data_get($execution, 's3_uploaded') !== false, ])> @php $statusText = match (data_get($execution, 'status')) { 'success' => data_get($execution, 's3_uploaded') === false ? 'Success (S3 Warning)' : 'Success', 'running' => 'In Progress', 'failed' => 'Failed', default => ucfirst(data_get($execution, 'status')), }; @endphp {{ $statusText }} {{-- Show pgBackRest badge if this is a pgBackRest backup --}} @if (data_get($execution, 'engine') === 'pgbackrest') pgBackRest @if (data_get($execution, 'pgbackrest_backup_type')) ({{ ucfirst(data_get($execution, 'pgbackrest_backup_type')) }}) @endif @endif
@if (data_get($execution, 'status') === 'running') Running for {{ calculateDuration(data_get($execution, 'created_at'), now()) }} @else {{ \Carbon\Carbon::parse(data_get($execution, 'finished_at'))->diffForHumans() }} ({{ calculateDuration(data_get($execution, 'created_at'), data_get($execution, 'finished_at')) }}) • {{ \Carbon\Carbon::parse(data_get($execution, 'finished_at'))->format('M j, H:i') }} @endif • Database: {{ data_get($execution, 'database_name', 'N/A') }} @if(data_get($execution, 'size')) • Size: {{ formatBytes(data_get($execution, 'size')) }} @elseif(data_get($execution, 'pgbackrest_repo_size')) • Repo Size: {{ formatBytes(data_get($execution, 'pgbackrest_repo_size')) }} @endif
@if (data_get($execution, 'engine') === 'pgbackrest' && data_get($execution, 'pgbackrest_label')) Label: {{ data_get($execution, 'pgbackrest_label') }} @else Location: {{ data_get($execution, 'filename', 'N/A') }} @endif
Backup Availability:
@if (data_get($execution, 'engine') === 'pgbackrest') {{-- For pgBackRest, show repository status instead of local/S3 --}} pgBackRest Repository @else !data_get( $execution, 'local_storage_deleted', false), 'bg-gray-100 text-gray-600 dark:bg-gray-800/50 dark:text-gray-400' => data_get( $execution, 'local_storage_deleted', false), ])> @if (!data_get($execution, 'local_storage_deleted', false)) @else @endif Local Storage @if (data_get($execution, 's3_uploaded') !== null) data_get($execution, 's3_uploaded') === false && !data_get($execution, 's3_storage_deleted', false), 'bg-green-100 text-green-800 dark:bg-green-900/30 dark:text-green-200' => data_get($execution, 's3_uploaded') === true && !data_get($execution, 's3_storage_deleted', false), 'bg-gray-100 text-gray-600 dark:bg-gray-800/50 dark:text-gray-400' => data_get($execution, 's3_storage_deleted', false), ])> @if (data_get($execution, 's3_uploaded') === true && !data_get($execution, 's3_storage_deleted', false)) @else @endif S3 Storage @endif @endif
@if (data_get($execution, 'message'))
{{ data_get($execution, 'message') }}
@endif
@if (data_get($execution, 'status') === 'success') @if (data_get($execution, 'engine') !== 'pgbackrest') Download @endif {{-- Show Restore button for successful pgBackRest backups --}} @if (data_get($execution, 'engine') === 'pgbackrest' && data_get($execution, 'pgbackrest_label')) @endif @endif @php $executionCheckboxes = []; $deleteActions = []; if (data_get($execution, 'engine') === 'pgbackrest') { $deleteActions[] = 'This will remove the backup entry from this list.'; $deleteActions[] = 'Note: The actual backup data in pgBackRest is managed by retention policies.'; } else { if (!data_get($execution, 'local_storage_deleted', false)) { $deleteActions[] = 'This backup will be permanently deleted from local storage.'; } if (data_get($execution, 's3_uploaded') === true && !data_get($execution, 's3_storage_deleted', false)) { $executionCheckboxes[] = ['id' => 'delete_backup_s3', 'label' => 'Delete the selected backup permanently from S3 Storage']; } if (empty($deleteActions)) { $deleteActions[] = 'This backup execution record will be deleted.'; } } @endphp
@empty
No executions found.
@endforelse
{{-- Restore Confirmation Modal --}} @if ($showRestoreModal && $restoreExecutionId) @php $restoreExecution = $executions->firstWhere('id', $restoreExecutionId); @endphp

Restore Database from pgBackRest Backup?

Backup Label:

{{ data_get($restoreExecution, 'pgbackrest_label') }}

This will stop the PostgreSQL database and restore it from the selected backup.

All data written after this backup was taken will be permanently lost.

The database will be temporarily unavailable during the restore process.

After restore, the database will automatically restart.

Cancel Restore Database
@endif {{-- Restore Progress Modal --}} @if ($showRestoreProgressModal && $currentRestore)
isFinished()) wire:poll.2000ms="pollRestoreStatus" @endif>
{{-- Header with status icon --}}
@if ($currentRestore->isRunning() || $currentRestore->isPending())
@elseif ($currentRestore->isSuccess())
@elseif ($currentRestore->isFailed())
@endif

pgBackRest Restore

$currentRestore->isRunning() || $currentRestore->isPending(), 'text-green-600 dark:text-green-400' => $currentRestore->isSuccess(), 'text-red-600 dark:text-red-400' => $currentRestore->isFailed(), ])> {{ ucfirst($currentRestore->status) }}
@if ($currentRestore->isFinished()) @endif
{{-- Progress bar for running state --}} @if ($currentRestore->isRunning() || $currentRestore->isPending())
@endif {{-- Backup label --}} @if ($currentRestore->target_label)

Backup Label:

{{ $currentRestore->target_label }}
@endif {{-- Status message --}} @if ($currentRestore->message)
$currentRestore->isRunning() || $currentRestore->isPending(), 'bg-green-50 dark:bg-green-900/20 border border-green-200 dark:border-green-800' => $currentRestore->isSuccess(), 'bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800' => $currentRestore->isFailed(), ])>

{{ $currentRestore->message }}

@endif {{-- Info banner for running state --}} @if ($currentRestore->isRunning() || $currentRestore->isPending())

The database is temporarily unavailable during restore. This modal will update automatically when the restore completes.

@endif {{-- Log output (scrollable) --}} @if ($currentRestore->log && ($currentRestore->isFailed() || $currentRestore->isSuccess()))

Restore Log:

{{ $currentRestore->log }}
@endif {{-- Action buttons --}}
@if ($currentRestore->isFinished()) {{ $currentRestore->isSuccess() ? 'Close' : 'Dismiss' }} @endif
@endif @endisset