Open zealousgit opened 2 years ago
👋 Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.
Debug mode
Describe the bug
I had deployed the SnipeIT in our local environment with WAMP server. In which I am only using apache to host it. Where as am using mysql5.7 which is deployed on other system.
Issue is upon generating the backup it shows me below error
Dumping database inventory... Backup failed because The dump process failed with exitcode 2 : Misuse of shell builtins : mysqldump: Couldn't execute 'SELECT COLUMN_NAME, JSON_EXTRACT(HISTOGRAM, '$."nu mber-of-buckets-specified"') FROM information_schema.COLUMN_STATISTICS WHERE SCHEMA_NAME = 'inventory' AND TABLE_NAME = 'accessories';': Unknown table 'COLUMN_STA TISTICS' in information_schema (1109) .
0 C:\wamp64\www\asset\vendor\spatie\db-dumper\src\DbDumper.php(263): Spatie\DbDumper\Exceptions\DumpFailed::processDidNotEndSuccessfully(Object(Symfony\Component\Process\Process))
1 C:\wamp64\www\asset\vendor\spatie\db-dumper\src\Databases\MySql.php(203): Spatie\DbDumper\DbDumper->checkIfDumpWasSuccessFul(Object(Symfony\Component\Process\Process), 'C:\wamp64\www\a..
.')
2 C:\wamp64\www\asset\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(260): Spatie\DbDumper\Databases\MySql->dumpToFile('C:\wamp64\www\a...')
3 [internal function]: Spatie\Backup\Tasks\Backup\BackupJob->Spatie\Backup\Tasks\Backup{closure}(Object(Spatie\DbDumper\Databases\MySql), 'mysql')
4 C:\wamp64\www\asset\vendor\laravel\framework\src\Illuminate\Collections\Collection.php(695): array_map(Object(Closure), Array, Array)
5 C:\wamp64\www\asset\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(263): Illuminate\Support\Collection->map(Object(Closure))
6 C:\wamp64\www\asset\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(171): Spatie\Backup\Tasks\Backup\BackupJob->dumpDatabases()
7 C:\wamp64\www\asset\vendor\spatie\laravel-backup\src\Tasks\Backup\BackupJob.php(147): Spatie\Backup\Tasks\Backup\BackupJob->createBackupManifest()
8 C:\wamp64\www\asset\vendor\spatie\laravel-backup\src\Commands\BackupCommand.php(56): Spatie\Backup\Tasks\Backup\BackupJob->run()
9 C:\wamp64\www\asset\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(36): Spatie\Backup\Commands\BackupCommand->handle()
10 C:\wamp64\www\asset\vendor\laravel\framework\src\Illuminate\Container\Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container{closure}()
11 C:\wamp64\www\asset\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
12 C:\wamp64\www\asset\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Arra
y, Object(Closure))
13 C:\wamp64\www\asset\vendor\laravel\framework\src\Illuminate\Container\Container.php(653): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NU
LL)
14 C:\wamp64\www\asset\vendor\laravel\framework\src\Illuminate\Console\Command.php(136): Illuminate\Container\Container->call(Array)
15 C:\wamp64\www\asset\vendor\symfony\console\Command\Command.php(298): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Console\Outpu
tStyle))
16 C:\wamp64\www\asset\vendor\laravel\framework\src\Illuminate\Console\Command.php(121): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Obj
ect(Illuminate\Console\OutputStyle))
17 C:\wamp64\www\asset\vendor\spatie\laravel-backup\src\Commands\BaseCommand.php(16): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Illuminate\Con
sole\OutputStyle))
18 C:\wamp64\www\asset\vendor\laravel\framework\src\Illuminate\Console\Concerns\CallsCommands.php(68): Spatie\Backup\Commands\BaseCommand->run(Object(Symfony\Component\Console\Input\ArrayInpu
t), Object(Illuminate\Console\OutputStyle))
19 C:\wamp64\www\asset\vendor\laravel\framework\src\Illuminate\Console\Concerns\CallsCommands.php(28): Illuminate\Console\Command->runCommand('backup:run', Array, Object(Illuminate\Console\Ou
tputStyle))
20 C:\wamp64\www\asset\app\Console\Commands\SystemBackup.php(41): Illuminate\Console\Command->call('backup:run')
21 C:\wamp64\www\asset\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(36): App\Console\Commands\SystemBackup->handle()
22 C:\wamp64\www\asset\vendor\laravel\framework\src\Illuminate\Container\Util.php(40): Illuminate\Container\BoundMethod::Illuminate\Container{closure}()
23 C:\wamp64\www\asset\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure))
24 C:\wamp64\www\asset\vendor\laravel\framework\src\Illuminate\Container\BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Arra
y, Object(Closure))
25 C:\wamp64\www\asset\vendor\laravel\framework\src\Illuminate\Container\Container.php(653): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NU
LL)
26 C:\wamp64\www\asset\vendor\laravel\framework\src\Illuminate\Console\Command.php(136): Illuminate\Container\Container->call(Array)
27 C:\wamp64\www\asset\vendor\symfony\console\Command\Command.php(298): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\Output
Style))
28 C:\wamp64\www\asset\vendor\laravel\framework\src\Illuminate\Console\Command.php(121): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Obje
ct(Illuminate\Console\OutputStyle))
29 C:\wamp64\www\asset\vendor\symfony\console\Application.php(1040): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output
\ConsoleOutput))
30 C:\wamp64\www\asset\vendor\symfony\console\Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(App\Console\Commands\SystemBackup), Object(Symfony\Component\Con
sole\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
31 C:\wamp64\www\asset\vendor\symfony\console\Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Co
nsole\Output\ConsoleOutput))
32 C:\wamp64\www\asset\vendor\laravel\framework\src\Illuminate\Console\Application.php(94): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Objec
t(Symfony\Component\Console\Output\ConsoleOutput))
33 C:\wamp64\www\asset\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(129): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Objec
t(Symfony\Component\Console\Output\ConsoleOutput))
34 C:\wamp64\www\asset\artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
35 {main}
Backup failed because: The dump process failed with exitcode 2 : Misuse of shell builtins : mysqldump: Couldn't execute 'SELECT COLUMN_NAME, JSON_EXTRACT(HISTOGRAM, '$."n umber-of-buckets-specified"') FROM information_schema.COLUMN_STATISTICS WHERE SCHEMA_NAME = 'inventory' AND TABLE_NAME = 'accessories';': Unknown table 'COLUMN_ST ATISTICS' in information_schema (1109) .
Reproduction steps
1. 2. 3. ...
Expected behavior
It should create backup & take mysql dump from the server mentions inside .env but it seems its still taking localhost only why so.
Screenshots
Snipe-IT Version
v6.0.13 build 8923 (g30f4af3ac)
Operating System
Windows 10
Web Server
Apache
PHP Version
7.4.26
Operating System
Windows 10
Browser
firefox, chrome
Version
107
Device
No response
Operating System
No response
Browser
No response
Version
No response
Error messages
Additional context
Fresh install