[GH-ISSUE #2861] Kimai LXC Update removes plugins / custom data #595

Closed
opened 2026-02-26 12:46:01 +03:00 by kerem · 4 comments
Owner

Originally created by @Aals0n on GitHub (Mar 5, 2025).
Original GitHub issue: https://github.com/community-scripts/ProxmoxVE/issues/2861

Have you read and understood the above guidelines?

yes

📜 What is the name of the script you are using?

Kimai

📂 What was the exact command used to execute the script?

https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/kimai.sh

📝 Provide a clear and concise description of the issue.

In order to use plugins with kimai you need to create data in /opt/kimai/var/plugins. When using the update-script this directory and all it's content is wiped and replaced with the "empty" source.
(See attached link to Backup-Docs of Kimai)

This line of the update script is causing trouble:
rm -rf /opt/kimai

Maybe it would be possible to backup this data before running the update and restore it afterwards?

I thought about something like that (hope it helps):

Before update:

  • (check if there are files in /opt/kimai/var...?)
  • backup var folder to temp folder
    cp -r /opt/kimai/var /opt/kimai_var_backup

After update:

  • restore backup folder
    mv /opt/kimai_var_backup /opt/kimai/var
  • carry on with permission settings etc.

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 12

🔄 Steps to reproduce the issue.

"Install" plugins / create data in /opt/kimai/var/…

Run update script >> This line is executed: rm -rf /opt/kimai >> plugins & any custom data in /opt/kimai/var/… is gone.

Paste the full error output (if available).

No error log (see above)

🖼️ Additional context (optional).

>This is the Kimai-Docs about Backups.<

Originally created by @Aals0n on GitHub (Mar 5, 2025). Original GitHub issue: https://github.com/community-scripts/ProxmoxVE/issues/2861 ### ✅ Have you read and understood the above guidelines? yes ### 📜 What is the name of the script you are using? Kimai ### 📂 What was the exact command used to execute the script? https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/kimai.sh ### 📝 Provide a clear and concise description of the issue. In order to use plugins with kimai you need to create data in _/opt/kimai/var/plugins_. When using the update-script this directory and all it's content is wiped and replaced with the "empty" source. (See attached link to Backup-Docs of Kimai) This line of the update script is causing trouble: `rm -rf /opt/kimai` Maybe it would be possible to backup this data before running the update and restore it afterwards? I thought about something like that (hope it helps): Before update: - (check if there are files in /opt/kimai/var...?) - backup _var_ folder to temp folder `cp -r /opt/kimai/var /opt/kimai_var_backup` After update: - restore backup folder `mv /opt/kimai_var_backup /opt/kimai/var` - carry on with permission settings etc. ### ⚙️ What settings are you using? - [x] Default Settings - [ ] Advanced Settings ### 🖥️ Which Linux distribution are you using? Debian 12 ### 🔄 Steps to reproduce the issue. "Install" plugins / create data in /opt/kimai/var/… Run update script >> This line is executed: `rm -rf /opt/kimai` >> plugins & any custom data in /opt/kimai/var/… is gone. ### ❌ Paste the full error output (if available). No error log (see above) ### 🖼️ Additional context (optional). [>This is the Kimai-Docs about Backups.<](https://www.kimai.org/documentation/backups.html)
kerem 2026-02-26 12:46:01 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@MickLesk commented on GitHub (Mar 5, 2025):

https://github.com/community-scripts/ProxmoxVE/pull/2862

<!-- gh-comment-id:2700937258 --> @MickLesk commented on GitHub (Mar 5, 2025): https://github.com/community-scripts/ProxmoxVE/pull/2862
Author
Owner

@Aals0n commented on GitHub (Mar 5, 2025):

Wow! That's a fast fix!

I like the restructured backup & restore process! Maybe you could even add

msg_info "Backup of Kimai configuration and var directory restored"

Thanks a lot!

<!-- gh-comment-id:2700957700 --> @Aals0n commented on GitHub (Mar 5, 2025): Wow! That's a fast fix! I like the restructured backup & restore process! Maybe you could even add `msg_info "Backup of Kimai configuration and var directory restored"` Thanks a lot!
Author
Owner

@MickLesk commented on GitHub (Mar 5, 2025):

I had at first, but then I would have to make it even more detailed, because every msg_info needs a msg_ok, otherwise the spinner hangs endlessly in the console. (and msg_info in msg_info do the same)
That's why I opted for the short version and wrote everything in Update :-)

<!-- gh-comment-id:2701113403 --> @MickLesk commented on GitHub (Mar 5, 2025): I had at first, but then I would have to make it even more detailed, because every msg_info needs a msg_ok, otherwise the spinner hangs endlessly in the console. (and msg_info in msg_info do the same) That's why I opted for the short version and wrote everything in Update :-)
Author
Owner

@Aals0n commented on GitHub (Mar 5, 2025):

Alright, didn't knew that.
Thanks for the quick fix of the update script! 💯

<!-- gh-comment-id:2701127631 --> @Aals0n commented on GitHub (Mar 5, 2025): Alright, didn't knew that. Thanks for the quick fix of the update script! 💯
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE#595
No description provided.