[PR #3213] [MERGED] Fix openwebui update script when backup directory already exists #4202

Closed
opened 2026-02-26 13:36:00 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/3213
Author: @chrisdoc
Created: 3/18/2025
Status: Merged
Merged: 3/18/2025
Merged by: @tremor021

Base: mainHead: fix/openwebui


📝 Commits (1)

  • aa9f75f Fix openwebui update script when backup directory already exists

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 ct/openwebui.sh (+2 -2)

📄 Description

✍️ Description

The OpenWebUI update script fails when a previous backup was already created, hence the change is to use mkdir -p which does not throw an error if the directory /opt/open-webui-backup exists

asciicast

   ____                      _       __     __    __  ______
  / __ \____  ___  ____     | |     / /__  / /_  / / / /  _/
 / / / / __ \/ _ \/ __ \    | | /| / / _ \/ __ \/ / / // /  
/ /_/ / /_/ /  __/ / / /    | |/ |/ /  __/ /_/ / /_/ // /   
\____/ .___/\___/_/ /_/     |__/|__/\___/_.___/\____/___/   
    /_/                                                     

⠋ Updating Open WebUI (Patience)mkdir: cannot create directory ‘/opt/open-webui-backup’: File exists

[ERROR] in line 32: exit code 0: while executing command mkdir /opt/open-webui-backup

root@openwebui:/opt/open-webui#

I have tested this by running bash -c "$(wget -qLO - https://raw.githubusercontent.com/chrisdoc/ProxmoxVE/aa9f75fd1663ecf5a6d0156e4615f61dec3b950e/ct/openwebui.sh)"

asciicast

Link: #

Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No breaking changes – Existing functionality remains intact.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

🔍 Code & Security Review (X in brackets)

  • Follows Code_Audit.md & CONTRIBUTING.md guidelines

📋 Additional Information (optional)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE/pull/3213 **Author:** [@chrisdoc](https://github.com/chrisdoc) **Created:** 3/18/2025 **Status:** ✅ Merged **Merged:** 3/18/2025 **Merged by:** [@tremor021](https://github.com/tremor021) **Base:** `main` ← **Head:** `fix/openwebui` --- ### 📝 Commits (1) - [`aa9f75f`](https://github.com/community-scripts/ProxmoxVE/commit/aa9f75fd1663ecf5a6d0156e4615f61dec3b950e) Fix openwebui update script when backup directory already exists ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `ct/openwebui.sh` (+2 -2) </details> ### 📄 Description <!--🛑 New scripts must first be submitted to [ProxmoxVED](https://github.com/community-scripts/ProxmoxVED) for testing. PRs for new scripts that skip this process will be closed. --> ## ✍️ Description <!-- Briefly describe your changes. --> The OpenWebUI update script fails when a previous backup was already created, hence the change is to use `mkdir -p` which does not throw an error if the directory `/opt/open-webui-backup` exists [![asciicast](https://asciinema.org/a/bHtX5sVv8Pe7XXluptLAS85RA.svg)](https://asciinema.org/a/bHtX5sVv8Pe7XXluptLAS85RA) ```sh ____ _ __ __ __ ______ / __ \____ ___ ____ | | / /__ / /_ / / / / _/ / / / / __ \/ _ \/ __ \ | | /| / / _ \/ __ \/ / / // / / /_/ / /_/ / __/ / / / | |/ |/ / __/ /_/ / /_/ // / \____/ .___/\___/_/ /_/ |__/|__/\___/_.___/\____/___/ /_/ ⠋ Updating Open WebUI (Patience)mkdir: cannot create directory ‘/opt/open-webui-backup’: File exists [ERROR] in line 32: exit code 0: while executing command mkdir /opt/open-webui-backup root@openwebui:/opt/open-webui# ``` I have tested this by running `bash -c "$(wget -qLO - https://raw.githubusercontent.com/chrisdoc/ProxmoxVE/aa9f75fd1663ecf5a6d0156e4615f61dec3b950e/ct/openwebui.sh)"` [![asciicast](https://asciinema.org/a/6WBgAPl76TDV9aIhBjG5o9HD8.svg)](https://asciinema.org/a/6WBgAPl76TDV9aIhBjG5o9HD8) ## 🔗 Related PR / Issue Link: # ## ✅ Prerequisites (**X** in brackets) - [x] **Self-review completed** – Code follows project standards. - [x] **Tested thoroughly** – Changes work as expected. - [x] **No breaking changes** – Existing functionality remains intact. - [x] **No security risks** – No hardcoded secrets, unnecessary privilege escalations, or permission issues. --- ## 🛠️ Type of Change (**X** in brackets) - [x] 🐞 **Bug fix** – Resolves an issue without breaking functionality. - [ ] ✨ **New feature** – Adds new, non-breaking functionality. - [ ] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. - [ ] 🆕 **New script** – A fully functional and tested script or script set. - [ ] 🌍 **Website update** – Changes to website-related JSON files or metadata. - [ ] 🔧 **Refactoring / Code Cleanup** – Improves readability or maintainability without changing functionality. - [ ] 📝 **Documentation update** – Changes to `README`, `AppName.md`, `CONTRIBUTING.md`, or other docs. --- ## 🔍 Code & Security Review (**X** in brackets) - [x] **Follows `Code_Audit.md` & `CONTRIBUTING.md` guidelines** ## 📋 Additional Information (optional) <!-- Add any extra context, screenshots, or references. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 13:36:00 +03:00
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#4202
No description provided.