spatie / laravel-backup

A package to backup your Laravel app

Home Page:https://spatie.be/docs/laravel-backup

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Backup just contains the success message

philharmonie opened this issue · comments

I installed the package and run it:

php artisan backup:run
Starting backup...
Dumping database mpv...
Determining files to backup...
Zipping 1 files and directories...
Created zip containing 1 files and directories. Size is 177 B
Copying zip to disk named local...
Successfully copied zip to disk named local.
Backup completed!

The backup is there and contains a sql file in the db-dumps folder.
But the only content of the 1kb file is:

Backup erfolgreich durchgeführt.

This is a German text but the text itself is not included in lang/vendor/de/notifications.php, what is weird.

Note:
I found out, that I have an "old" backup script in the root of the project:

@echo off

set mysql_user=user
set mysql_password=pass
set mysql_host=localhost
set mysql_port=3306
set database_name=db
set backup_folder=C:\inetpub\wwwroot\storage\app\backups

set "timestamp=%date:~6,4%%date:~3,2%%date:~0,2%_%time:~0,2%%time:~3,2%%time:~6,2%"

"C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqldump.exe" --user=%mysql_user% --password=%mysql_password% %database_name% > %backup_folder%\%timestamp%.sql

echo Backup erfolgreich durchgeführt.

This script is called mysqldump.bat and it seems like the tool is using this file. When I remove it, it works fine.

When I remove it, it works fine.

So, there is no bug

Also, It's not compatible with Windows

This backup package requires **PHP 8.0**, with the [ZIP module](http://php.net/manual/en/book.zip.php) and **Laravel 9.0 or higher**. It's not compatible with Windows servers.