Skip to content

Commit 46482fa

Browse files
authored
Add error handling to backup and restore commands
1 parent 25f068f commit 46482fa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ct/openwebui.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ function update_script() {
3333
msg_info "Creating Backup"
3434
mkdir -p /opt/open-webui-backup
3535
cp -a /opt/open-webui/backend/data /opt/open-webui-backup/data || true
36-
cp -a /opt/open-webui/.env /opt/open-webui-backup/.env
36+
cp -a /opt/open-webui/.env /opt/open-webui-backup/.env || true
3737
msg_ok "Created Backup"
3838

3939
msg_info "Removing legacy installation"
@@ -49,7 +49,7 @@ function update_script() {
4949
msg_info "Restoring data"
5050
mkdir -p /root/.open-webui
5151
cp -a /opt/open-webui-backup/data/* /root/.open-webui/ || true
52-
cp -a /opt/open-webui-backup/.env /root/.env
52+
cp -a /opt/open-webui-backup/.env /root/.env || true
5353
rm -rf /opt/open-webui-backup || true
5454
msg_ok "Restored data"
5555

0 commit comments

Comments
 (0)