Im able to create backup with files using
Artisan::call('backup:run --only-files)
many times, but when it comes to
Artisan::call('backup:run --only-db)
it can only do once. I noticed that the temp folder is not empty due to the saved db.sql
has only read permissions. when I added manually a write
permission, then the temp folder can be deleted.
There is no issue using a command line, only when I use Artisan::call()
.