mxgross / EasyBackupBundle

Kimai 2 Plugin for easier backups
MIT License
25 stars 6 forks source link

cant backup #39

Closed forenade closed 3 years ago

forenade commented 3 years ago

hi there.. I have updated and gone start to use your kimai 2 for time report and iam now trying to fix Easy Backup plugin first befor i go live. But i cant get it to work :-( When i press the backup butten it only go to login screen and say something whent wrong. Is this plugin not working with the new update or do i need to set someting up?

mxgross commented 3 years ago

Hi which kimai2 version are you using?

Please try setting the permissions again

sudo chown -R :www-data .
sudo chmod -R g+r .
sudo chmod -R g+rw var/
sudo chmod -R g+rw public/avatars/

And then rebuild the cache:

cd /kimai/
bin/console cache:clear
bin/console cache:warmup
Sometimes the permissions must be set again
sudo chown -R :www-data .
sudo chmod -R g+r .
sudo chmod -R g+rw var/
sudo chmod -R g+rw public/avatars/

And check if there is anything in the EasyBackup Log and post it here if your problem is not solved with the steps above. Thanks

forenade commented 3 years ago

1.15.3 i use I have tryed that but do still not work 🙁 This is what kimai log say

[2021-10-15 09:03:22] security.DEBUG: Stored the security token in the session. {"key":"_security_secured_area"} [] [2021-10-15 09:03:22] request.CRITICAL: Uncaught PHP Exception Symfony\Component\Filesystem\Exception\IOException: "Failed to touch "/var/www/kimai2/var/easy_backup/easybackup.log"." at /var/www/kimai2/vendor/symfony/filesystem/Filesystem.php line 151 {"exception":"[object] (Symfony\Component\Filesystem\Exception\IOException(code: 0): Failed to touch \"/var/www/kimai2/var/easy_backup/easybackup.log\". at /var/www/kimai2/vendor/symfony/filesystem/Filesystem.php:151)"} [] [2021-10-15 09:03:22] security.DEBUG: Guard authenticator does not support the request. {"firewall_key":"secured_area","authenticator":"App\Security\TokenAuthenticator"} [] [2021-10-15 09:03:22] security.DEBUG: Checking support on guard authenticator. {"firewall_key":"secured_area","authenticator":"App\Security\TokenAuthenticator"} [] [2021-10-15 09:03:22] security.DEBUG: Checking for guard authentication credentials. {"firewall_key":"secured_area","authenticators":1} [] [2021-10-15 09:03:22] security.DEBUG: User was reloaded from a user provider. {"provider":"App\Security\KimaiUserProvider","username":"admin"} [] [2021-10-15 09:03:22] security.DEBUG: Read existing security token from the session. {"key":"_security_secured_area","token_class":"Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken"} [] [2021-10-15 09:03:22] request.INFO: Matched route "create_backup". {"route":"create_backup","route_parameters":{"_route":"create_backup","_controller":"KimaiPlugin\EasyBackupBundle\Controller\EasyBackupController::createBackupAction","_locale":"sv"},"request_uri":"http://xxxxxxxx/sv/admin/easy-backup/create_backup","method":"GET"} []

mxgross commented 3 years ago

Seems like you have no permission to create (touch command) the file /var/www/kimai2/var/easy_backup/easybackup.log Try to create it manually and make sure your user running kimai has also write permission inside the /var/www/kimai2/var/easy_backup/ folder and subfolders