[GH-ISSUE #1712] Chat DB download missing user chats #12606

Closed
opened 2026-04-19 19:31:52 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @ghost on GitHub (Apr 24, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/1712

Bug Report

Description

Bug Summary:
I as the Admin downloaded the entire database and opened the .db file in SQLite viewer.
I could see all the users registered on the host, but the db did not have their chats in it when I opened it.
The chat session history is needed for audit purposes and reporting.
I set the permissions for user role to "downt allow chat deletion".
Are all the prompts and responses for all users supposed to be logged in the SQLite db?

Steps to Reproduce:
Downloaded the db a couple of times, but no luck finding other user role chats.
I was able to see their chats when downloading the JSON with all chats, but this is less useful vs having the chat session history in a db.

Expected Behavior:
I was hoping to see all the chats for all users in the db after the download.

Actual Behavior:
I am only seeing my own chats.

Environment

  • Open WebUI Version: [0.1.120]

  • Operating System: macOS

Reproduction Details

Confirmation:

  • [ y] I have read and followed all the instructions provided in the README.md.
  • [ y] I am on the latest version of both Open WebUI and Ollama.
  • [ n/a] I have included the browser console logs.
  • [ n/a] I have included the Docker container logs.

Logs and Screenshots

Browser Console Logs:
[Include relevant browser console logs, if applicable]

Docker Container Logs:
[Include relevant Docker container logs, if applicable]

Screenshots (if applicable):
[Attach any relevant screenshots to help illustrate the issue]

Installation Method

[Describe the method you used to install the project,: Docker

Originally created by @ghost on GitHub (Apr 24, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/1712 # Bug Report ## Description **Bug Summary:** I as the Admin downloaded the entire database and opened the .db file in SQLite viewer. I could see all the users registered on the host, but the db did not have their chats in it when I opened it. The chat session history is needed for audit purposes and reporting. I set the permissions for user role to "downt allow chat deletion". Are all the prompts and responses for all users supposed to be logged in the SQLite db? **Steps to Reproduce:** Downloaded the db a couple of times, but no luck finding other user role chats. I was able to see their chats when downloading the JSON with all chats, but this is less useful vs having the chat session history in a db. **Expected Behavior:** I was hoping to see all the chats for all users in the db after the download. **Actual Behavior:** I am only seeing my own chats. ## Environment - **Open WebUI Version:** [0.1.120] - **Operating System:** macOS ## Reproduction Details **Confirmation:** - [ y] I have read and followed all the instructions provided in the README.md. - [ y] I am on the latest version of both Open WebUI and Ollama. - [ n/a] I have included the browser console logs. - [ n/a] I have included the Docker container logs. ## Logs and Screenshots **Browser Console Logs:** [Include relevant browser console logs, if applicable] **Docker Container Logs:** [Include relevant Docker container logs, if applicable] **Screenshots (if applicable):** [Attach any relevant screenshots to help illustrate the issue] ## Installation Method [Describe the method you used to install the project,: Docker
Author
Owner

@justinh-rahb commented on GitHub (Apr 24, 2024):

I would try copying it from the container manually to verify there's no user chats showing in it:

docker cp open-webui:/app/backend/data/webui.db .

Can you also share how and what query you're using to extract user chats?

<!-- gh-comment-id:2073839439 --> @justinh-rahb commented on GitHub (Apr 24, 2024): I would try copying it from the container manually to verify there's no user chats showing in it: ```bash docker cp open-webui:/app/backend/data/webui.db . ``` Can you also share how and what query you're using to extract user chats?
Author
Owner

@ghost commented on GitHub (Apr 24, 2024):

Thanks @justinh-rahb the file copy works fine on CLI per your command above. It yields the same result as the "download the database" command from the GUI. Both methods do not show user chats other than my own. I am using SQLite Browser to view the files, I have not yet started creating SQL to query the db as I dont have the full db yet...

In the admin role, I have set the "chat delete" off so that users have not been able to delete their own chats.

Any thoughts?

Image 4-23-24 at 11 21 PM

<!-- gh-comment-id:2073941815 --> @ghost commented on GitHub (Apr 24, 2024): Thanks @justinh-rahb the file copy works fine on CLI per your command above. It yields the same result as the "download the database" command from the GUI. Both methods do not show user chats other than my own. I am using SQLite Browser to view the files, I have not yet started creating SQL to query the db as I dont have the full db yet... In the admin role, I have set the "chat delete" off so that users have not been able to delete their own chats. Any thoughts? ![Image 4-23-24 at 11 21 PM](https://github.com/open-webui/open-webui/assets/166965973/61b58cca-a234-4c1a-bad7-26cc1c447284)
Author
Owner

@ghost commented on GitHub (Apr 24, 2024):

@justinh-rahb I am assuming that all chats from all users are always supposed to be stored in the SQLite db?

<!-- gh-comment-id:2073969253 --> @ghost commented on GitHub (Apr 24, 2024): @justinh-rahb I am assuming that all chats from all users are always supposed to be stored in the SQLite db?
Author
Owner

@justinh-rahb commented on GitHub (Apr 24, 2024):

I see different user_ids listed in your screenshot, you're saying these are all you? My eyes are telling me a different story.
Screenshot 2024-04-24 at 11 22 10 AM

<!-- gh-comment-id:2075209313 --> @justinh-rahb commented on GitHub (Apr 24, 2024): I see different `user_id`s listed in your screenshot, you're saying these are all you? My eyes are telling me a different story. ![Screenshot 2024-04-24 at 11 22 10 AM](https://github.com/open-webui/open-webui/assets/52832301/8bf62b71-d158-4116-b8a3-cba64c4879bc)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#12606