←Back

Introduction | laravel-backup | Spatie

Installation and setup | laravel-backup | Spatie

php artisan backup:run --only-db

image.png

This is only for local development.

backup of database on hosting cannot be done like this, depends on your hosting plan

Installation Steps

  1. First enable zip extension in php.ini;

image.png

  1. Remove ‘;’ from ;extension.zip to enable this extension, and save the file

image.png

  1. Then

composer require spatie/laravel-backup

  1. Then to create configuration file (see docs); php artisan vendor:publish --provider="Spatie\\Backup\\BackupServiceProvider" --tag=backup-config

  2. Then add dump path to config/database.php;