Open-webui add .env backup and restore functionality from older versions (#9592)

This commit is contained in:
DrDonoso 2025-12-02 17:10:59 +01:00 committed by GitHub
parent a06cab39a9
commit 3ab710472c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,6 +33,7 @@ function update_script() {
msg_info "Creating Backup"
mkdir -p /opt/open-webui-backup
cp -a /opt/open-webui/backend/data /opt/open-webui-backup/data || true
cp -a /opt/open-webui/.env /opt/open-webui-backup/.env || true
msg_ok "Created Backup"
msg_info "Removing legacy installation"
@ -48,6 +49,7 @@ function update_script() {
msg_info "Restoring data"
mkdir -p /root/.open-webui
cp -a /opt/open-webui-backup/data/* /root/.open-webui/ || true
cp -a /opt/open-webui-backup/.env /root/.env || true
rm -rf /opt/open-webui-backup || true
msg_ok "Restored data"