Skip to main content
Back to packages
1,204 GitHub stars

spatie/laravel-db-snapshots

View on GitHub

Description

Quickly dump and load databases

This package provides Artisan commands to quickly dump and load databases in a Laravel application.

# Create a dump
php artisan snapshot:create my-first-dump
 
# Make some changes to your db
# ...
 
# Create another dump
php artisan snapshot:create my-second-dump
 
# Load up the first dump
php artisan snapshot:load my-first-dump
 
# Load up the latest dump
php artisan snapshot:load --latest
 
# List all snapshots
php artisan snapshot:list
 
# Remove old snapshots. Keeping only the most recent
php artisan snapshot:cleanup --keep=2

This package supports MySQL, PostgreSQL and SQLite.

Recent Courses on Laravel Daily

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.