Kimai LXC Update removes plugins / custom data #596

Closed
opened 2026-02-04 20:15:21 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @Aals0n on GitHub (Mar 5, 2025).

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). ### ✅ 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)
OVERLORD added the bug label 2026-02-04 20:15:21 +03:00
Author
Owner

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

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

@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!

@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 :-)

@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! 💯

@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.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ProxmoxVE#596