-
Notifications
You must be signed in to change notification settings - Fork 2
Backup System
Azizul Hakim edited this page Jan 3, 2026
·
3 revisions
Automated application and database backup with Spatie Laravel Backup.
php artisan backup:runphp artisan backup:listphp artisan backup:cleanBackup configuration in config/backup.php:
return [
'backup' => [
'name' => env('APP_NAME', 'laravel-backup'),
'source' => [
'files' => [
'include' => [
base_path(),
],
'exclude' => [
base_path('vendor'),
base_path('node_modules'),
],
],
'databases' => [
'mysql',
],
],
'destination' => [
'disks' => [
'local',
],
],
],
];Configure cloud storage in .env:
# AWS S3
AWS_ACCESS_KEY_ID=your-key
AWS_SECRET_ACCESS_KEY=your-secret
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=your-bucket- Complete database dump
- Multiple database support
- Compression enabled
- Application files
- Storage directory
- Configuration files
- Excludes vendor/node_modules
Schedule backups in app/routes/console.php:
protected function schedule(Schedule $schedule)
{
$schedule->command('backup:clean')->daily();
$schedule->command('backup:run')->daily();
}# Create backup
php artisan backup:run
# Check backup status
php artisan backup:list
# Clean old backups
php artisan backup:cleanFor detailed documentation, see the Features Guide.
Copyright 2026, @AHS12 All Right Reserved
- Home - Documentation Overview
- Quick Start - Installation and setup
- Project Structure - Directory organization
- Features Overview - Summary of capabilities
- Backup System - Database backups
- Extra Information - Additional tools
- Observability - Dashboard & Telemetry
- Health Checks - System status
- Running Tests - Testing guide
- API Documentation - API specs & UI
- Docker Guide - Container setup