@extends('layouts.user_type.auth') @section('backupLog')
| Backup | Status | File | Size | Duration | Server | Finished |
|---|---|---|---|---|---|---|
|
{{ $log->backup_name }}
{{ $log->database_name ?: 'Database' }} · {{ ucfirst($log->source) }}
|
{{ ucfirst($log->status) }} |
{{ $log->file_name ?: '—' }}
@if($log->status === 'failed' && $log->message)
{{ $log->message }}
@elseif($log->storage_path)
{{ $log->storage_path }}
@endif
|
{{ $log->size_for_humans }} | {{ $log->duration_seconds !== null ? gmdate($log->duration_seconds >= 3600 ? 'H:i:s' : 'i:s', (int) $log->duration_seconds) : '—' }} | {{ $log->host ?: '—' }} | {{ $log->ran_at->format('d M Y') }}{{ $log->ran_at->format('H:i:s') }} |
|
No backups recorded yet
Runs appear here once the crontab script reports them.
|
||||||
Same server as this app — run the artisan command:
php {{ base_path('artisan') }} backup:log success --name=mysql-daily --database=all \
--file="$FILE" --size="$(stat -c%s "$LOCAL_FILE")" --path="gs://YOUR_BUCKET/$FILE" --duration="$SECONDS"
# on failure (e.g. in the script's error trap)
php {{ base_path('artisan') }} backup:log failed --name=mysql-daily --message="mysqldump failed"
Different server — call the API (set BACKUP_LOG_TOKEN in .env first):
curl -fsS -X POST {{ url('/api/backup-log') }} \
-H "X-Backup-Token: $BACKUP_LOG_TOKEN" -H "Accept: application/json" \
-d status=success -d backup_name=mysql-daily -d file_name="$FILE" \
-d file_size="$(stat -c%s "$LOCAL_FILE")" -d storage_path="gs://YOUR_BUCKET/$FILE"