Hi spatie,
I'm still having an issue when i want to create a backup on my windows machine.
Backup failed because The dump process failed with exitcode 1 : General error : Le chemin d鈥檃cc猫s sp茅cifi茅 est introuvable. (The path could not be found)
And the issue appears when it want to save the database to storage/app/laravel-backup/temp/db-dumps and the db-dumps doesn't exists.
To fix it i changed this method to :
/**
* Dumps the databases to the given directory.
* Returns an array with paths to the dump files.
*
* @return array
*/
protected function dumpDatabases(): array
{
(new TemporaryDirectory($this->temporaryDirectory->path('/')))
->name('db-dumps')
->force()
->create();
return $this->dbDumpers->map(function (DbDumper $dbDumper) {
consoleOutput()->info("Dumping database {$dbDumper->getDbName()}...");
$fileName = $dbDumper->getDbName().'.sql';
$temporaryFilePath = $this->temporaryDirectory->path('db-dumps'.'/'.$fileName);
$dbDumper->dumpToFile($temporaryFilePath);
return $temporaryFilePath;
})->toArray();
}
Best regards
We did a couple of fixes regarding the creation of the temporary directory over the weekend. Could you upgrade to the latest version of the package and verify that the problem persists?
Hi @freekmurze,
I use the version spatie/laravel-backup:4.4.7.
I gonna try 4.4.8 and see if it solves the issue.
UPDATE
No, same issue with 4.4.8.
How about updating TemporaryDirectory class to create sub directories like this:
$this->temporaryDirectory = (new TemporaryDirectory(storage_path('app/laravel-backup')))
->name('temp')
->subDirectories(['db-dumps', 'other-dumps/example'])
->force()
->create();
I found out the issue, you can close this issue after the PR merge.
I've tested the spatie/laravel-backup:4.4.9 and it works like a charm.
Hello Freekmurze
Am having issues backing up
"require": {
"php": ">=7.1.6",
"backpack/backupmanager": "^1.1.9",
"illuminate/support": "~5.1",
"intervention/image": "^2.4",
"laravel/framework": "5.4.*",
"laravel/tinker": "~1.0",
"laravelcollective/html": "^5.4",
"maatwebsite/excel": "~2.1.0",
"nao-pon/flysystem-google-drive": "~1.1",
"odannyc/laravel-alertify": "^1.0",
"spatie/laravel-backup": "^3.1.9",
"zizaco/entrust": "5.2.x-dev"
},
The Error i get is
Backup failed because The dump process failed with exitcode 1 : General error : 'mysqldump' is not recognized as an internal or external command,
operable program or batch file.
[Symfony\Component\Debug\Exception\FatalThrowableError]
Call to undefined method Illuminate\Foundation\Application::backupHasFailed()
I need your help please
Hi, i got this error too on :
"spatie/laravel-backup": "^5.0.0"
Based on MR https://github.com/spatie/laravel-backup/pull/371 , it should solved right ? but why i still produced this error on newer version ?
Before, i also has this thread >> https://github.com/spatie/laravel-backup/issues/1071
Anyone please help
CC @arcanedev-maroc
Thanks
Hello Freekmurze
Am having issues backing up
"require": {
"php": ">=7.1.6",
"backpack/backupmanager": "^1.1.9",
"illuminate/support": "~5.1",
"intervention/image": "^2.4",
"laravel/framework": "5.4.*",
"laravel/tinker": "~1.0",
"laravelcollective/html": "^5.4",
"maatwebsite/excel": "~2.1.0",
"nao-pon/flysystem-google-drive": "~1.1",
"odannyc/laravel-alertify": "^1.0",
"spatie/laravel-backup": "^3.1.9",
"zizaco/entrust": "5.2.x-dev"
},The Error i get is
Backup failed because The dump process failed with exitcode 1 : General error : 'mysqldump' is not recognized as an internal or external command,
operable program or batch file.
[Symfony\Component\Debug\Exception\FatalThrowableError]
Call to undefined method Illuminate\Foundation\Application::backupHasFailed()I need your help please
add mysql executable to windows path variable
Most helpful comment
Hello Freekmurze
Am having issues backing up
"require": {
"php": ">=7.1.6",
"backpack/backupmanager": "^1.1.9",
"illuminate/support": "~5.1",
"intervention/image": "^2.4",
"laravel/framework": "5.4.*",
"laravel/tinker": "~1.0",
"laravelcollective/html": "^5.4",
"maatwebsite/excel": "~2.1.0",
"nao-pon/flysystem-google-drive": "~1.1",
"odannyc/laravel-alertify": "^1.0",
"spatie/laravel-backup": "^3.1.9",
"zizaco/entrust": "5.2.x-dev"
},
The Error i get is
Backup failed because The dump process failed with exitcode 1 : General error : 'mysqldump' is not recognized as an internal or external command,
operable program or batch file.
[Symfony\Component\Debug\Exception\FatalThrowableError]
Call to undefined method Illuminate\Foundation\Application::backupHasFailed()
I need your help please