Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server Error: 500 (Internal Server Error) when creating a backup #1337

Closed
abdullahalasham opened this issue Nov 11, 2015 · 34 comments
Closed

Comments

@abdullahalasham
Copy link

by the way when i try to generate a backup i get Server Error: 500 (Internal Server Error)

@snipe
Copy link
Owner

snipe commented Nov 11, 2015

We need to know what the actual error is. Please turn on debugging and provide log files. http://docs.snipeitapp.com/getting-help.html

@abdullahalasham
Copy link
Author

i got the following error

ArgumentException
HELP
The "C:\wamp\www\ict\app\storage\dumps2015111191450-db.sql" directory does not exist.
Open: C:\wamp\www\ict\vendor\symfony\finder\Symfony\Component\Finder\Finder.php

    foreach ((array) $dirs as $dir) {
        if (is_dir($dir)) {
            $resolvedDirs[] = $dir;
        } elseif ($glob = glob($dir, GLOB_BRACE | GLOB_ONLYDIR)) {
            $resolvedDirs = array_merge($resolvedDirs, $glob);
        } else {
            throw new \InvalidArgumentException(sprintf('The "%s" directory does not exist.', $dir));
        }
    }

GET Data empty
POST Data empty
Files empty
Cookies
laravel_session eyJpdiI6IktoVGhNV210Q0dudzBuOHA4Vk5BRytvdFllbFZyVm0rWEVCKzJ3SFpnTVU9IiwidmFsdWUiOiJzc1pDMXplNm1weDA5dGVcLyt6dWpzNk1rbzNLMkhYNTJWXC9ySE1CUlpkVFNNTGhXOWNvNWMwYVkyaktYS1FlRlg0OGs1eDdyaE9UajBVZGNQODYrUWRRPT0iLCJtYWMiOiIwMGUwNGQ5NzlmM2MwODcyZWE4ODRjZWE5ZWJjOWQxNWMwMjcyMmE1YmYyOWZlMDEyNzQzMDBjNGMxY2RkYjU5In0=
Session empty
Server/Request Data
REDIRECT_STATUS 200
HTTP_HOST 127.0.0.1
HTTP_CONNECTION keep-alive
CONTENT_LENGTH 0
HTTP_CACHE_CONTROL max-age=0
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
HTTP_ORIGIN http://127.0.0.1
HTTP_UPGRADE_INSECURE_REQUESTS 1
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36
CONTENT_TYPE application/x-www-form-urlencoded
HTTP_REFERER http://127.0.0.1/admin/settings/backups
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_ACCEPT_LANGUAGE ar,en-US;q=0.8,en;q=0.6
HTTP_COOKIE laravel_session=eyJpdiI6IktoVGhNV210Q0dudzBuOHA4Vk5BRytvdFllbFZyVm0rWEVCKzJ3SFpnTVU9IiwidmFsdWUiOiJzc1pDMXplNm1weDA5dGVcLyt6dWpzNk1rbzNLMkhYNTJWXC9ySE1CUlpkVFNNTGhXOWNvNWMwYVkyaktYS1FlRlg0OGs1eDdyaE9UajBVZGNQODYrUWRRPT0iLCJtYWMiOiIwMGUwNGQ5NzlmM2MwODcyZWE4ODRjZWE5ZWJjOWQxNWMwMjcyMmE1YmYyOWZlMDEyNzQzMDBjNGMxY2RkYjU5In0%3D
PATH C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Enterprise Vault\EVClient\x64;C:\Program Files\Dell\Dell Data Protection\Drivers\TSS\bin;C:\wamp\bin\php\php5.5.12;C:\ProgramData\ComposerSetup\bin;
SystemRoot C:\Windows
COMSPEC C:\Windows\system32\cmd.exe
PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
WINDIR C:\Windows
SERVER_SIGNATURE

Apache/2.4.9 (Win64) PHP/5.5.12 Server at 127.0.0.1 Port 80
SERVER_SOFTWARE Apache/2.4.9 (Win64) PHP/5.5.12
SERVER_NAME 127.0.0.1
SERVER_ADDR 127.0.0.1
SERVER_PORT 80
REMOTE_ADDR 127.0.0.1
DOCUMENT_ROOT C:/wamp/www/ict/public
REQUEST_SCHEME http
CONTEXT_PREFIX
CONTEXT_DOCUMENT_ROOT C:/wamp/www/ict/public
SERVER_ADMIN [email protected]
SCRIPT_FILENAME C:/wamp/www/ict/public/index.php
REMOTE_PORT 50292
REDIRECT_URL /admin/settings/backups
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD POST
QUERY_STRING
REQUEST_URI /admin/settings/backups
SCRIPT_NAME /index.php
PHP_SELF /index.php
REQUEST_TIME_FLOAT 1447276489.775
REQUEST_TIME 1447276489
Environment Variables empty
Registered Handlers

@snipe
Copy link
Owner

snipe commented Nov 11, 2015

If you copy app/config/packages/schickling/backup/config.example.php to app/config/packages/schickling/backup/config.php, does it do the same thing?

@abdullahalasham
Copy link
Author

iget

ErrorException (E_WARNING)
HELP
opendir(app/storage/dumps/,app/storage/dumps/): The system cannot find the path specified. (code: 3)

@abdullahalasham
Copy link
Author

my config file is

<?php
return array(
    'path' => '\app\storage\dumps',

    'mysql' => array(
        'dump_command_path' => '',
        'restore_command_path' => '',
    ),

    's3' => array(
        'path' => ''
    ),

    'compress' => true,
);

@rmgau
Copy link

rmgau commented Nov 19, 2015

Hi Guys,

Hope you don't mind my adding into this one. I have encountered the exact same issue as the OP.

Small differences being I'm running on IIS rather than WAMP. Following the debug/test steps you suggested, I get a slight difference. When I load the /admin/settings/backups page, I immediately hit a 500 error. Without the config you requested, I have to hit the backup button in order to hit a 500 error.

Snipe-it version: (v2.0-175)
System Info: Windows 10 with IIS 10

If you need anything, please let me know.

StrackTrace_2015-11-19.txt
Server_Request-2015-11-19.txt
DEBUG_StrackTrace_2015-11-19.txt
DEBUG_Server_Request-2015-11-19.txt
log-cgi-fcgi-2015-11-19.txt

@abdullahalasham
Copy link
Author

Dear snipe

would you please help in this

@snipe
Copy link
Owner

snipe commented Nov 19, 2015

What happens if you set the path setting to the full path on your system?

@abdullahalasham
Copy link
Author

i get :

filesize(): stat failed for C:\wamp\www\ict\app/storage/dumps2015111380105-backup.zip

@snipe
Copy link
Owner

snipe commented Nov 19, 2015

Where? When you load the backups page, or when you try to create a backup?

@abdullahalasham
Copy link
Author

when i click in the backup icon

the dump file has the following files 2015111380105-backup.zip inside it dumps there is a file 2015111380105-db.sql with size 0 byte

my config file is :

'C:\wamp\www\ict\app\storage\dumps', ``` 'mysql' => array( 'dump_command_path' => '', 'restore_command_path' => '', ), 's3' => array( 'path' => '' ), 'compress' => false, ``` );

@abdullahalasham
Copy link
Author

if i remove 2015111380105-backup.zip from the dumps i can open backup icon with no error and when generating new backup i get the following error
InvalidArgumentException
HELP
The "C:\wamp\www\ict\app\storage\dumps2015111940623-db.sql" directory does not exist.
Open: C:\wamp\www\ict\vendor\symfony\finder\Symfony\Component\Finder\Finder.php

    foreach ((array) $dirs as $dir) {
        if (is_dir($dir)) {
            $resolvedDirs[] = $dir;
        } elseif ($glob = glob($dir, GLOB_BRACE | GLOB_ONLYDIR)) {
            $resolvedDirs = array_merge($resolvedDirs, $glob);
        } else {
            throw new \InvalidArgumentException(sprintf('The "%s" directory does not exist.', $dir));
        }
    }

GET Data empty
POST Data empty
Files empty

@snipe
Copy link
Owner

snipe commented Nov 19, 2015

That backup that was there is old, based on the timestamp.

Try adding a trailing slash to your path in your config

@abdullahalasham
Copy link
Author

i tried and get the following :

Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_UNKNOWN)
HELP
syntax error, unexpected 'mysql' (T_STRING), expecting ')'
Open: C:\wamp\www\ict\app\config\packages\schickling\backup\config.php

return array(
    'path' => 'C:\wamp\www\ict\app\storage\dumps\',

    'mysql' => array(
        'dump_command_path' => '',
        'restore_command_path' => '',
    ),

    's3' => array(
GET Data empty
POST Data empty
Files empty

@snipe
Copy link
Owner

snipe commented Nov 19, 2015

Something is wrong there - that's a parse error, which is unrelated to your backup issue. Can you paste me the whole file. And please use Github markdown, so it's clearer.

@abdullahalasham
Copy link
Author

Whoops! There was an error..html.pdf

sorry i don`t know how to use Github markdown so i upload a page kindly remove .pdf to view it

@abdullahalasham
Copy link
Author

  1. InvalidArgumentException
    …\vendor\symfony\finder\Symfony\Component\Finder\Finder.php677

  2. Symfony\Component\Finder\Finder in
    …\vendor\laravel\framework\src\Illuminate\Filesystem\Filesystem.php285

  3. Illuminate\Filesystem\Filesystem directories
    …\vendor\chumper\zipper\src\Chumper\Zipper\Zipper.php361

  4. Chumper\Zipper\Zipper addDir
    …\vendor\chumper\zipper\src\Chumper\Zipper\Zipper.php157

  5. Chumper\Zipper\Zipper add
    …\app\commands\SystemBackup.php55

  6. SystemBackup fire
    …\vendor\laravel\framework\src\Illuminate\Console\Command.php112

  7. Illuminate\Console\Command execute
    …\vendor\symfony\console\Symfony\Component\Console\Command\Command.php253

  8. Symfony\Component\Console\Command\Command run
    …\vendor\laravel\framework\src\Illuminate\Console\Command.php100

  9. Illuminate\Console\Command run
    …\vendor\laravel\framework\src\Illuminate\Console\Application.php101

  10. Illuminate\Console\Application call
    <#unknown>0

  11. call_user_func_array
    …\vendor\laravel\framework\src\Illuminate\Foundation\Artisan.php57

  12. Illuminate\Foundation\Artisan __call
    …\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php208

  13. Illuminate\Foundation\Artisan call
    …\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php208

  14. Illuminate\Support\Facades\Facade __callStatic
    …\app\controllers\admin\SettingsController.php195

  15. Illuminate\Support\Facades\Artisan call
    …\app\controllers\admin\SettingsController.php195

  16. Controllers\Admin\SettingsController postBackups
    <#unknown>0

  17. call_user_func_array
    …\vendor\laravel\framework\src\Illuminate\Routing\Controller.php231

  18. Illuminate\Routing\Controller callAction
    …\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php93

  19. Illuminate\Routing\ControllerDispatcher call
    …\vendor\laravel\framework\src\Illuminate\Routing\ControllerDispatcher.php62

  20. Illuminate\Routing\ControllerDispatcher dispatch
    …\vendor\laravel\framework\src\Illuminate\Routing\Router.php967

  21. Illuminate\Routing\Router Illuminate\Routing{closure}
    <#unknown>0

  22. call_user_func_array
    …\vendor\laravel\framework\src\Illuminate\Routing\Route.php109

  23. Illuminate\Routing\Route run
    …\vendor\laravel\framework\src\Illuminate\Routing\Router.php1033

  24. Illuminate\Routing\Router dispatchToRoute
    …\vendor\laravel\framework\src\Illuminate\Routing\Router.php1001

  25. Illuminate\Routing\Router dispatch
    …\vendor\laravel\framework\src\Illuminate\Foundation\Application.php775

  26. Illuminate\Foundation\Application dispatch
    …\vendor\laravel\framework\src\Illuminate\Foundation\Application.php745

  27. Illuminate\Foundation\Application handle
    …\vendor\barryvdh\laravel-debugbar\src\Middleware\Stack.php34

  28. Barryvdh\Debugbar\Middleware\Stack handle
    …\vendor\laravel\framework\src\Illuminate\Session\Middleware.php72

  29. Illuminate\Session\Middleware handle
    …\vendor\laravel\framework\src\Illuminate\Cookie\Queue.php47

  30. Illuminate\Cookie\Queue handle
    …\vendor\laravel\framework\src\Illuminate\Cookie\Guard.php51

  31. Illuminate\Cookie\Guard handle
    …\vendor\stack\builder\src\Stack\StackedHttpKernel.php23

  32. Stack\StackedHttpKernel handle
    …\vendor\laravel\framework\src\Illuminate\Foundation\Application.php641

  33. Illuminate\Foundation\Application run
    …\public\index.php49
    InvalidArgumentException
    HELP
    The "C:\wamp\www\ict\app\storage\dumps2015111941833-db.sql" directory does not exist.
    Open: C:\wamp\www\ict\vendor\symfony\finder\Symfony\Component\Finder\Finder.php

    foreach ((array) $dirs as $dir) {
        if (is_dir($dir)) {
            $resolvedDirs[] = $dir;
        } elseif ($glob = glob($dir, GLOB_BRACE | GLOB_ONLYDIR)) {
            $resolvedDirs = array_merge($resolvedDirs, $glob);
        } else {
            throw new \InvalidArgumentException(sprintf('The "%s" directory does not exist.', $dir));
        }
    }
    

    GET Data empty
    POST Data empty
    Files empty
    Cookies
    userTableDisplay-vv2_0_5-pre_bs_table_pageNumber 1
    userTableDisplay-vv2_0_5-pre_bs_table_sortOrder asc
    userTableDisplay-vv2_0_5-pre_bs_table_sortName notes
    consumablesTable-vv2_0_5-pre_bs_table_searchText
    userTableDisplay-vv2_0_5-pre_bs_table_searchText saee
    assetTable-vv2_0_5-pre_bs_table_sortOrder asc
    assetTable-vv2_0_5-pre_bs_table_sortName last_checkout
    assetTable-vv2_0_5-pre_bs_table_pageNumber 2
    assetTable-vv2_0_5-pre_bs_table_searchText
    laravel_session eyJpdiI6Ik9oQjhhZXhvOEROTm9Va3NFMlF1WlRORHVXTlJ1TGczRlRjOUcycEhoMWc9IiwidmFsdWUiOiIzcmFDdnNlNHI1VFpNNDkzTzdyV3RmUStJelJ2U0VOZldEWVJEU1pjOCs3TnppRFFaeUFoOHlhNjFIMEk3ZHBkV1crdmgyQXlVR3pcL0k4c2lGbmlZa1E9PSIsIm1hYyI6ImU4ZmZiOTE3YmRhNjliMGY3MmVhZjA4YmEzM2NhOTkyN2Y0ODYyZTczOTYxOWNlYzVhNzIzOWE4NTUwMGYyOTIifQ==
    Session empty
    Server/Request Data
    REDIRECT_STATUS 200
    HTTP_HOST 127.0.0.1
    HTTP_CONNECTION keep-alive
    CONTENT_LENGTH 0
    HTTP_CACHE_CONTROL max-age=0
    HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
    HTTP_ORIGIN http://127.0.0.1
    HTTP_UPGRADE_INSECURE_REQUESTS 1
    HTTP_USER_AGENT Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36
    CONTENT_TYPE application/x-www-form-urlencoded
    HTTP_REFERER http://127.0.0.1/admin/settings/backups
    HTTP_ACCEPT_ENCODING gzip, deflate
    HTTP_ACCEPT_LANGUAGE ar,en-US;q=0.8,en;q=0.6
    HTTP_COOKIE userTableDisplay-vv2.0.5-pre.bs.table.pageNumber=1; userTableDisplay-vv2.0.5-pre.bs.table.sortOrder=asc; userTableDisplay-vv2.0.5-pre.bs.table.sortName=notes; consumablesTable-vv2.0.5-pre.bs.table.searchText=; userTableDisplay-vv2.0.5-pre.bs.table.searchText=saee; assetTable-vv2.0.5-pre.bs.table.sortOrder=asc; assetTable-vv2.0.5-pre.bs.table.sortName=last_checkout; assetTable-vv2.0.5-pre.bs.table.pageNumber=2; assetTable-vv2.0.5-pre.bs.table.searchText=; laravel_session=eyJpdiI6Ik9oQjhhZXhvOEROTm9Va3NFMlF1WlRORHVXTlJ1TGczRlRjOUcycEhoMWc9IiwidmFsdWUiOiIzcmFDdnNlNHI1VFpNNDkzTzdyV3RmUStJelJ2U0VOZldEWVJEU1pjOCs3TnppRFFaeUFoOHlhNjFIMEk3ZHBkV1crdmgyQXlVR3pcL0k4c2lGbmlZa1E9PSIsIm1hYyI6ImU4ZmZiOTE3YmRhNjliMGY3MmVhZjA4YmEzM2NhOTkyN2Y0ODYyZTczOTYxOWNlYzVhNzIzOWE4NTUwMGYyOTIifQ%3D%3D
    PATH C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\3.0\bin\x64;c:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Enterprise Vault\EVClient\x64;C:\Program Files\Dell\Dell Data Protection\Drivers\TSS\bin;C:\wamp\bin\php\php5.5.12;C:\ProgramData\ComposerSetup\bin;
    SystemRoot C:\Windows
    COMSPEC C:\Windows\system32\cmd.exe
    PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
    WINDIR C:\Windows
    SERVER_SIGNATURE

    Apache/2.4.9 (Win64) PHP/5.5.12 Server at 127.0.0.1 Port 80
    SERVER_SOFTWARE Apache/2.4.9 (Win64) PHP/5.5.12
    SERVER_NAME 127.0.0.1
    SERVER_ADDR 127.0.0.1
    SERVER_PORT 80
    REMOTE_ADDR 127.0.0.1
    DOCUMENT_ROOT C:/wamp/www/ict/public
    REQUEST_SCHEME http
    CONTEXT_PREFIX
    CONTEXT_DOCUMENT_ROOT C:/wamp/www/ict/public
    SERVER_ADMIN [email protected]
    SCRIPT_FILENAME C:/wamp/www/ict/public/index.php
    REMOTE_PORT 3806
    REDIRECT_URL /admin/settings/backups
    GATEWAY_INTERFACE CGI/1.1
    SERVER_PROTOCOL HTTP/1.1
    REQUEST_METHOD POST
    QUERY_STRING
    REQUEST_URI /admin/settings/backups
    SCRIPT_NAME /index.php
    PHP_SELF /index.php
    REQUEST_TIME_FLOAT 1447949913.179
    REQUEST_TIME 1447949913
    Environment Variables empty
    Registered Handlers

  34. Whoops\Handler\PrettyPageHandler

@snipe
Copy link
Owner

snipe commented Nov 19, 2015

@abdullahalasham If I can be bothered to help you, you can be bothered to read one paragraph on Github markdown. https://help.github.com/articles/github-flavored-markdown/#fenced-code-blocks

@snipe
Copy link
Owner

snipe commented Nov 19, 2015

I was asking for the whole config file, not the HTML output of the error. You have a parse error, which is happening in the config file, so I need to see it so I can try to figure out what you did wrong.

@abdullahalasham
Copy link
Author

return array(
    'path' => 'C:\wamp\www\ict\app\storage\dumps',

    'mysql' => array(
        'dump_command_path' => '',
        'restore_command_path' => '',
    ),

    's3' => array(
        'path' => ''
    ),

    'compress' => false,
);

@abdullahalasham
Copy link
Author

the path is C:\wamp\www\ict\app\config\packages\schickling\backup\config.php

@snipe
Copy link
Owner

snipe commented Nov 19, 2015

My guess is that it's thinking the \' is meant to be escaping the ', although I can't imagine why. You have opening <?php at the top, right?

@abdullahalasham
Copy link
Author

what should i do overcome this issue

'C:\wamp\www\ict\app\storage\dumps', ``` 'mysql' => array( 'dump_command_path' => '', 'restore_command_path' => '', ), 's3' => array( 'path' => '' ), 'compress' => false, ``` );

@abdullahalasham
Copy link
Author

indeed i followed the coying /app/config/packages/schickling/backup/config.example.php to /app/config/packages/schickling/backup/config.php which include <?php BUT I DID NOT setup the pathe for SQLDUMP is that the issue? if so how to setup

@snipe
Copy link
Owner

snipe commented Nov 19, 2015

You shouldn't need to set the path for mysqldump (although on Windows I'm not sure).

This is an issue with Windows, and I don't have access to a Windows machine, so I'm not sure what to tell you. Perhaps one of our windows users can help - @kobie-chasehansen or @madd15?

@abdullahalasham
Copy link
Author

i solved th issue by changing the config to be :

'..\app\storage\dumps\', ``` 'mysql' => array( 'dump_command_path' => 'C:\wamp\bin\mysql\mysql5.6.17\bin\\', 'restore_command_path' => '', ), 's3' => array( 'path' => '' ), 'compress' => false, ``` ); as well as i installed Git for Windows but still don`t know the path for restore_command_path do you have any idea

@abdullahalasham
Copy link
Author

thank you for your support

@rmgau
Copy link

rmgau commented Nov 20, 2015

Hey Snipe and Abdulla,

This issue is still open for me.

Following your conversation, I also appeared to have been able to resolve the issue.

My issue was caused by the using a relative path without defining the root. The working config is:

<?php
return array(
    'path' => '../app/storage/dumps/',

    'mysql' => array(
        'dump_command_path' => '',
        'restore_command_path' => '',
    ),

    's3' => array(
        'path' => ''
    ),

    'compress' => false,
);

However, the database dump in the backup file is empty. In working to resolve I have added the direct path to the MySQL dump .exe, but no luck there either.
Config as below:

<?php
return array(
    'path' => '../app/storage/dumps/',

    'mysql' => array(
        'dump_command_path' => 'C:\Program Files\MariaDB 10.0\bin\\',
        'restore_command_path' => '',
    ),

    's3' => array(
        'path' => ''
    ),

    'compress' => false,
);

Would you like me to spin this off into it's own issue Snipe?

Apologies for the turn around time. Whilst we live 10 hours in the future in Australia, you're asleep when we do it :)

@snipe snipe mentioned this issue Nov 20, 2015
@abdullahalasham
Copy link
Author

kindly refer to the below links :
https://mariadb.com/kb/en/mariadb/mysqldump/
https://mariadb.com/kb/en/mariadb/backup-and-restore-overview/
http://lintut.com/backup-and-restore-mysql-mariadb-database-using-mysqldump/
from cmd browse to dump path and try to execute the following code

php artisan snipeit:backup

if it works then you have path issue in your config otherwise it is db configuration issue and you should contact the mariadb staff for their support

@apopro
Copy link

apopro commented Mar 18, 2016

Hi snipe,

I've the same problems using command php artisan snipeit:backup on our system. Currently we use

snipe-it v2.1.0-47-g39f40a3
php 5.4.24
mariadb 10.0
Windows 2008 R2

When I try to execute the command "php c:\inetpub\wwwroot\snipe-it\artisan snipeit:backup" with the following config.php

`<?php
return array(
'path' => '..\app\storage\dumps',

'mysql' => array(
'dump_command_path' => 'C:\Program Files\MariaDB 10.0\bin',
'restore_command_path' => '',
),

's3' => array(
'path' => ''
),

'compress' => false,

);`

I get the error

[ErrorException]
mkdir(): No such file or directory

The debug-logfile log-cli-2016-03-18.txt shows:

[2016-03-18 12:40:10] production.ERROR: exception 'ErrorException' with message 'mkdir(): No such file or directory' in C:\inetpub\wwwroot\snipe-it\vendor\schickling\backup\src\Schickling\Backup\Commands\BackupCommand.php:117
Stack trace:
#0 [internal function]: Illuminate\Exception\Handler->handleError(2, 'mkdir(): No suc...', 'C:\inetpub\wwwr...', 117, Array)
#1 C:\inetpub\wwwroot\snipe-it\vendor\schickling\backup\src\Schickling\Backup\Commands\BackupCommand.php(117): mkdir('..\app\storage...')
#2 C:\inetpub\wwwroot\snipe-it\vendor\schickling\backup\src\Schickling\Backup\Commands\BackupCommand.php(19): Schickling\Backup\Commands\BackupCommand->checkDumpFolder()
#3 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Console\Command.php(112): Schickling\Backup\Commands\BackupCommand->fire()
#4 C:\inetpub\wwwroot\snipe-it\vendor\symfony\console\Symfony\Component\Console\Command\Command.php(253): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Console\Command.php(100): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Console\Command.php(128): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArrayInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 C:\inetpub\wwwroot\snipe-it\app\commands\SystemBackup.php(48): Illuminate\Console\Command->call('db:backup', Array)
#8 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Console\Command.php(112): SystemBackup->fire()
#9 C:\inetpub\wwwroot\snipe-it\vendor\symfony\console\Symfony\Component\Console\Command\Command.php(253): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 C:\inetpub\wwwroot\snipe-it\vendor\laravel\framework\src\Illuminate\Console\Command.php(100): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 C:\inetpub\wwwroot\snipe-it\vendor\symfony\console\Symfony\Component\Console\Application.php(889): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#12 C:\inetpub\wwwroot\snipe-it\vendor\symfony\console\Symfony\Component\Console\Application.php(193): Symfony\Component\Console\Application->doRunCommand(Object(SystemBackup), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#13 C:\inetpub\wwwroot\snipe-it\vendor\symfony\console\Symfony\Component\Console\Application.php(124): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#14 C:\inetpub\wwwroot\snipe-it\artisan(59): Symfony\Component\Console\Application->run()
#15 {main} [] []

I tried different versions of the path var like "\app\storage\dumps" or full path and nothing changes.

PATH var includes bin of MariaDB and snipe-it root.

Any idea?

Many thanks. Great software by the way.

@rmgau
Copy link

rmgau commented Mar 29, 2016

Hi All,

It's worth noting that I was unable to find a resolution for this issue.

I continued to have the empty backup file issue right up until the entire instance just failed.

I have since stopped the usage of Snipe-it until I can set it up properly in Linux.

I just wanted to call this out given the number of people posting back to this topic and the above poster.

The software is fantastic, but I'd be looking to run it on Linux to avoid the oddities tbh.

@snipe
Copy link
Owner

snipe commented Mar 29, 2016

I'm not sure why you would need to stop using it altogether just because backups don't work. They are a very small part of the system, and you can easily do your own manual backups.

@rmgau
Copy link

rmgau commented Mar 29, 2016

I had another issue that caused me to walk away, as stated above.

I was pulled away from my implementing Snipe-it for other work obligations. I returned 3 weeks later to find my instance was crashed. Every time I accessed it I received a 500 error and I couldn't get logs out of the system. There were no configuration changes made and I have no idea what's caused it and I couldn't fix it.

I figured it was more likely that the issue was up-stream of your software and probably in the PHP on IIS libraries (which aren't properly supported anymore anyway).

I would consider running Snipe-it on IIS to be an untenable deployment. It might be fine on Apache on Windows, but I haven't tested it. I also don't think this is the fault of your software, thus me not mentioning it until queried.

@snipe
Copy link
Owner

snipe commented Mar 29, 2016

If you didn't upgrade it, then you didn't get anything from upstream here. Once you download it, your interaction with us is done, unless/until you download an upgrade, so there's nothing on our end that could have caused your 500 errors.

Many, many people run Snipe-IT on IIS (more than run on it Linux, if I had to guess). My guess would be that someone modified data while you were gone which is causing an app error because the data integrity has been lost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants