@extends('layouts.app') @section('title', 'Database Backups') @section('nav_backups', 'bg-teal-50 text-teal-700 font-semibold') @section('content')
{{-- Header --}}

Database Backups

Create and download full snapshots of the {{ config('database.connections.mysql.database') }} database.

@csrf
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- Sensitive-data notice --}}
Backups contain all guest data, payments, and staff logins. Store downloaded files securely and delete old copies you no longer need. They are kept in storage/app/backups (never web-accessible).
{{-- Backup list --}}

Saved Backups

{{ $backups->count() }} file{{ $backups->count() === 1 ? '' : 's' }} · {{ $totalSize }}
@if($backups->isEmpty())
No backups yet. Click Create Backup to make your first snapshot.
@else
@foreach($backups as $b)
{{ $b['name'] }}
{{ $b['created_at']->format('M j, Y · g:i A') }} · {{ $b['size_human'] }}
Download
@csrf @method('DELETE')
@endforeach
@endif

Restore overwrites the live database with a saved snapshot. A fresh safety backup is taken automatically first, and you'll be signed out to log in again. You can also restore a downloaded file manually with mysql -u root pvh_pms < backup.sql.

{{-- Type-to-confirm restore modal --}}
@endsection