spatie / laravel-backup

A package to backup your Laravel app
https://spatie.be/docs/laravel-backup
MIT License
5.65k stars 763 forks source link

Backup just contains the success message #1670

Closed philharmonie closed 1 year ago

philharmonie commented 1 year ago

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.

parallels999 commented 1 year ago

When I remove it, it works fine.

So, there is no bug

Also, It's not compatible with Windows https://github.com/spatie/laravel-backup/blob/d3c7d35afba6e09ff3459848ee6bc7d44587ccfb/docs/requirements.md?plain=1#L6