whatisgithub

What is laravel-backup?

spatie/laravel-backup — explained in plain English

Analysis updated 2026-06-26

5,980PHPAudience · developerComplexity · 2/5LicenseSetup · easy

In one sentence

A Laravel package that automates creating, storing, and monitoring backups of your app's files and database, with support for multiple storage destinations, health alerts, and automatic cleanup of old backups.

Mindmap

mindmap
  root((Laravel Backup))
    What it does
      Automated backups
      Backup monitoring
    Backup contents
      Database dumps
      App files
    Storage destinations
      Local disk
      Amazon S3
      Cloud providers
    Features
      Health checks
      Notifications
      Auto cleanup
    Audience
      Laravel developers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Automatically back up your Laravel app's database and files on a schedule to Amazon S3.

USE CASE 2

Set up health monitoring to receive a Slack alert if a backup fails or is too old.

USE CASE 3

Send each backup to multiple destinations at once so you have both local and cloud copies.

USE CASE 4

Configure automatic deletion of old backups to prevent disk space from filling up over time.

What is it built with?

PHPLaravel

How does it compare?

spatie/laravel-backupdoctrine/collectionsitsgoingd/clockwork
Stars5,9805,9805,940
LanguagePHPPHPPHP
Setup difficultyeasyeasymoderate
Complexity2/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Requires PHP 8.4 and Laravel 12 or higher, cloud storage destinations need configured Laravel filesystem drivers.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

So what is it?

Laravel Backup is a PHP package for Laravel applications that automates the process of creating backup copies of your app's files and database. When you run the backup command, it collects the files from directories you specify, exports a dump of your database, and packages everything into a single zip file. You can store backups to any file storage destination that Laravel supports, which includes local disk, Amazon S3, and other cloud storage providers. The package also lets you send backups to multiple destinations at the same time, so a single backup run can land in more than one location. Beyond creating backups, the package includes a monitoring system that checks whether your backups are healthy: whether they exist, whether they are recent enough, and whether they are above a minimum file size. If a problem is detected, you can receive notifications through various channels such as email or Slack. To prevent disk space from filling up over time, the package can automatically delete old backups according to rules you configure, keeping recent backups more frequently and older ones less so. The package is developed by Spatie, a Belgian web agency known for maintaining a large catalog of open-source Laravel packages. It requires PHP 8.4 and Laravel 12 or higher. Documentation and installation instructions are hosted on the Spatie website. It is licensed under MIT.

Copy-paste prompts

Prompt 1
Show me how to configure laravel-backup in a Laravel 12 app to back up the database and specific folders to Amazon S3 every night.
Prompt 2
Using spatie/laravel-backup, how do I set up Slack notifications so my team is alerted if a backup fails or has not run recently?
Prompt 3
How do I configure laravel-backup to send each backup to both local disk and an S3 bucket at the same time?
Prompt 4
Set up the laravel-backup monitor command so it checks that recent backups exist and are above a minimum file size.
Prompt 5
How do I configure laravel-backup to keep daily backups for 7 days, weekly for 4 weeks, and monthly for 3 months?

Frequently asked questions

What is laravel-backup?

A Laravel package that automates creating, storing, and monitoring backups of your app's files and database, with support for multiple storage destinations, health alerts, and automatic cleanup of old backups.

What language is laravel-backup written in?

Mainly PHP. The stack also includes PHP, Laravel.

What license does laravel-backup use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is laravel-backup to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is laravel-backup for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.