@extends('layout.app') @section('title', 'Database Backup & Restore - Fleet SRP Desktop') @section('content')
@if(session('success_msg')) @endif @if(session('error_msg')) @endif
Auto Daily Backup {{ $hasTodayBackup ? 'Today Done' : 'Pending On Close' }}
{{ $hasTodayBackup ? 'Backup Active' : 'Auto Schedule' }}

Runs automatically on software launch & close.

{{ $backupDir }}
Saved Backups {{ count($backups) }} Files
{{ $totalSizeFormatted }} Total Size

Stored locally on your disk for safety.

PostgreSQL Safe Offline Local
Immediate Action
Create & Download

Instantly snapshot your database and save or download a `.sql` copy.

@csrf
Create Local Backup File

Save a full database snapshot directly into your backup directory ({{ $backupDir }}).

@csrf
A timestamp will automatically be added to the filename.
Restore / Import Database from File
Caution: Restoring will overwrite the current database with the selected backup file data.
@csrf
Saved Local Backups History
Location: {{ $backupDir }}
@forelse($backups as $index => $b) @empty @endforelse
# Backup Filename Type Created On File Size Actions
{{ $index + 1 }}
{{ $b['filename'] }}
{{ $b['path'] }}
@if($b['is_auto']) Daily Auto @else Manual @endif {{ $b['created_at'] }} {{ $b['size'] }}
Download
No backup files found yet

Click "Download Backup Now" or "Create Local Backup" above to generate your first backup.

@push('footer_script') @endpush @endsection