laravel-backup

Automate Laravel file and database backups with Spatie Laravel Backup.

Updated Oct 26, 2025
One-click install
npx skills add https://github.com/Hieubkav/wincellarCloneBackend --skill laravel-backup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: laravel-backup
Source: https://github.com/Hieubkav/wincellarCloneBackend/tree/main/.factory/skills/laravel-backup
Command: npx skills add https://github.com/Hieubkav/wincellarCloneBackend --skill laravel-backup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires spatie/laravel-backup, and includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill guides configuring, implementing, and monitoring automated backups for Laravel applications using the spatie/laravel-backup package, covering file and database backups, storage destinations, retention, and notifications.

Core Features & Use Cases

  • Scheduling backups and cleanups
  • File and database backup configurations
  • Multi-disk destinations (local, S3, etc.)
  • Notifications (email, Slack)
  • Health monitoring and encrypted backups

Quick Start

Install the package, publish configuration, and run a backup to verify end-to-end backup flow.

Frequently Asked Questions about laravel-backup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Laravel backups to run on a schedule?

Automate Laravel backups by configuring the spatie/laravel-backup package in config/backup.php, then scheduling the backup:run artisan command via Laravel's task scheduler in app/Console/Kernel.php. The scheduler handles the cron execution automatically.

Can I back up Laravel databases to multiple storage destinations like S3?

Yes, spatie/laravel-backup supports multi-disk destinations in config/backup.php. Configure local, S3, or other disk drivers to store database dumps and files across multiple storage targets simultaneously.

How do I set up notifications when Laravel backups complete or fail?

Configure notifications in config/backup.php to send alerts via email or Slack after backup completion or failure. The package sends notifications automatically when configured with your preferred channel and recipients.

What's the best way to manage backup retention and cleanup in Laravel?

Use the backup:clean artisan command scheduled in your task scheduler to automatically remove old backups based on retention policies defined in config/backup.php, keeping only recent backups and freeing storage space.

Does spatie/laravel-backup support encrypted backups?

Yes, encryption is configured in config/backup.php. Enable encryption controls to protect backup files at rest and ensure sensitive database and file data remains secure during storage and transfer.

How do I monitor Laravel backup health and verify backups are working?

Run the backup:monitor artisan command to check backup health status. The package verifies that recent backups exist, are stored in configured destinations, and haven't failed or missed scheduled runs.