mxgross / EasyBackupBundle

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

Error installing on Kimai2 Docker #58

Open vpanchal-code opened 1 year ago

vpanchal-code commented 1 year ago

I have Kimai v2.0.23 running on docker and when I tried to install the the EasyBackupBundle plugin, It is does not show up in the kimai. The installation steps I took:

  1. Created the "EasyBackupBundle" directory in the plugins directory and move all the downloaded files into it. Contains the EasyBackupBundle.php under the EasyBackupBundle Directory.
  2. Set the permissions: docker exec --user root kimai chown -R www-data:www-data /opt/kimai/var
  3. Reloaded the cache: docker exec -ti kimai /opt/kimai/bin/console kimai:reload --env=prod
  4. Set the permissions again (just incase): docker exec --user root kimai chown -R www-data:www-data /opt/kimai/var

When I logged back into kimai on my browser, I do not see the easybackup option in the menu and the plugins page shows no plugins installed. The logs on the doctor menu shows the following two entries related to easybackup:

[2023-05-23T10:51:07.826782+00:00] deprecation.INFO: User Deprecated: Since symfony/console 6.1: Relying on the static property "$defaultDescription" for setting a command description is deprecated. Add the "Symfony\Component\Console\Attribute\AsCommand" attribute to the "KimaiPlugin\EasyBackupBundle\Command\EasyBackupBackupCommand" class instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Since symfony/console 6.1: Relying on the static property \"$defaultDescription\" for setting a command description is deprecated. Add the \"Symfony\\Component\\Console\\Attribute\\AsCommand\" attribute to the \"KimaiPlugin\\EasyBackupBundle\\Command\\EasyBackupBackupCommand\" class instead. at /opt/kimai/vendor/symfony/console/Command/Command.php:104)"} []
[2023-05-23T10:51:07.825446+00:00] deprecation.INFO: User Deprecated: Since symfony/console 6.1: Relying on the static property "$defaultName" for setting a command name is deprecated. Add the "Symfony\Component\Console\Attribute\AsCommand" attribute to the "KimaiPlugin\EasyBackupBundle\Command\EasyBackupBackupCommand" class instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Since symfony/console 6.1: Relying on the static property \"$defaultName\" for setting a command name is deprecated. Add the \"Symfony\\Component\\Console\\Attribute\\AsCommand\" attribute to the \"KimaiPlugin\\EasyBackupBundle\\Command\\EasyBackupBackupCommand\" class instead. at /opt/kimai/vendor/symfony/console/Command/Command.php:85)"} []

Also, I tried with reloading the cache with the following steps and did not work:

docker exec -ti kimai /opt/kimai/bin/console cache:clear --env=prod
docker exec -ti kimai /opt/kimai/bin/console cache:warmup --env=prod
vpanchal-code commented 1 year ago

I update to the new image that was released today and now the EasyBackupBundle is showing up under System and also cloned the git repo instead of downloading, however, under status check I have the following errors:

image

I read about the https://github.com/tobybatch/kimai2/discussions/450 and enabled the port 3036 on the my sqldb but still not passing the checks. Although, as you can see in the image, it did find the sqldb. Not sure why it cannot find the other remaining item. Im not sure what I am missing

vpanchal-code commented 1 year ago

I updated the easybackup configuration settings to be hardcoded with the username and password, then reloaded cache, but this still did not solve the issue.

empx92 commented 10 months ago

same issue with /usr/bin/mysqldump --version and /usr/bin/mysql --version on my site

but after some research i found a information which could be the actual problem:

"Starting with 11.0.1 mariadb, mysqldump is deprecated and removed from the mariadb Docker Official Image. Use mariadb-dump instead. (https://mariadb.com/kb/en/mysqldump/)"

mxgross commented 9 months ago

Hi @empx92 , does it work with mariadb-dump when you change the Kimai2 EasyBackup configuration for the mysqldump commands/paths?

empx92 commented 9 months ago

Hi @empx92 , does it work with mariadb-dump when you change the Kimai2 EasyBackup configuration for the mysqldump commands/paths? /usr/bin/mariadb-dump --version sh:1:/usr/bin/mariadb-dump: not found /usr/bin/mysql --version sh: 1: /usr/bin/mysql: not found

so sorry it isn't working

m-idler commented 3 months ago

In general neither git nor mysql/mysqldump is installed by default in the docker kimai image. A temporary workaround is to install those packages within the container via apt install git mariadb-client. For a permanent solution it would be required to either change the used kimai image or to create a new custom image