IRIS Docker container loses data on upgrade or recreation due to incorrect volume configuration #22034

Closed
opened 2026-02-21 20:15:23 -05:00 by yindo · 1 comment
Owner

Originally created by @TomoOkuyama on GitHub (Feb 3, 2026).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.11.4

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Configure IRIS as the vector database in Dify
  2. Create a knowledge base and add documents (data is indexed in IRIS)
  3. Remove and recreate the container: docker compose --profile iris down && docker compose --profile iris up -d
    • Or upgrade the IRIS image version
  4. Attempt to search the knowledge base

✔️ Expected Behavior

IRIS data should persist across container recreation and upgrades.

Actual Behavior

Problem 1: Data loss on container recreation or upgrade

  • The USER namespace data stored at /usr/irissys/mgr/user/ is not persisted
  • All indexed documents are lost when the container is removed and recreated

Problem 2: Initialization flag file causes inconsistent state

  • Current volume mount: ./volumes/iris:/opt/iris
  • Flag file /opt/iris/.iris-configured persists in the volume
  • After container recreation, the flag file exists but data doesn't
  • Initialization is skipped, leaving IRIS in an unconfigured state
Originally created by @TomoOkuyama on GitHub (Feb 3, 2026). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.11.4 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. Configure IRIS as the vector database in Dify 2. Create a knowledge base and add documents (data is indexed in IRIS) 3. Remove and recreate the container: `docker compose --profile iris down && docker compose --profile iris up -d` - Or upgrade the IRIS image version 4. Attempt to search the knowledge base ### ✔️ Expected Behavior IRIS data should persist across container recreation and upgrades. ### ❌ Actual Behavior **Problem 1: Data loss on container recreation or upgrade** - The USER namespace data stored at `/usr/irissys/mgr/user/` is not persisted - All indexed documents are lost when the container is removed and recreated **Problem 2: Initialization flag file causes inconsistent state** - Current volume mount: `./volumes/iris:/opt/iris` - Flag file `/opt/iris/.iris-configured` persists in the volume - After container recreation, the flag file exists but data doesn't - Initialization is skipped, leaving IRIS in an unconfigured state
yindo added the 🐞 bug label 2026-02-21 20:15:23 -05:00
yindo closed this issue 2026-02-21 20:15:23 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 3, 2026):

Your data loss is happening because the IRIS Docker service only mounts ./volumes/iris to /opt/iris, but IRIS actually stores user namespace data (including indexed documents) in /usr/irissys/mgr/user, which is not persisted by this mount. When you recreate or upgrade the container, that directory is wiped, so all your data is lost. Meanwhile, the initialization flag file (/opt/iris/.iris-configured) persists in the mounted volume, so the entrypoint script skips re-initialization—even though the actual data is missing—leaving IRIS in an inconsistent state where it appears configured but has no data [docker-compose.yaml].

To fix this, you need to persist the IRIS data directory by adding a volume mount for /usr/irissys/mgr/user. For example, add this to your IRIS service in docker-compose.yaml:

volumes:
  - ./volumes/iris:/opt/iris
  - ./volumes/iris-user:/usr/irissys/mgr/user
  - ./iris/iris-init.script:/iris-init.script
  - ./iris/docker-entrypoint.sh:/custom-entrypoint.sh

This ensures both the configuration flag and the actual user data survive container recreation or upgrades.

If you have already lost data and the flag file exists but the user data directory is empty, you may need to manually remove the .iris-configured flag file from ./volumes/iris before restarting the container, so the initialization script runs again and IRIS is properly set up [docker-entrypoint.sh].

Always back up your volumes before making changes to avoid accidental data loss. For production, double-check permissions on your host directories and avoid using docker compose down --volumes, which deletes all data [discussion].

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Feb 3, 2026): <!-- Answer --> Your data loss is happening because the IRIS Docker service only mounts ./volumes/iris to /opt/iris, but IRIS actually stores user namespace data (including indexed documents) in /usr/irissys/mgr/user, which is not persisted by this mount. When you recreate or upgrade the container, that directory is wiped, so all your data is lost. Meanwhile, the initialization flag file (/opt/iris/.iris-configured) persists in the mounted volume, so the entrypoint script skips re-initialization—even though the actual data is missing—leaving IRIS in an inconsistent state where it appears configured but has no data [[docker-compose.yaml](https://github.com/langgenius/dify/blob/aa7fe42615b7d0fd4a8fe638e8d57a5959a7f7a8/docker/docker-compose.yaml#L1340-L1354)]. To fix this, you need to persist the IRIS data directory by adding a volume mount for /usr/irissys/mgr/user. For example, add this to your IRIS service in docker-compose.yaml: ```yaml volumes: - ./volumes/iris:/opt/iris - ./volumes/iris-user:/usr/irissys/mgr/user - ./iris/iris-init.script:/iris-init.script - ./iris/docker-entrypoint.sh:/custom-entrypoint.sh ``` This ensures both the configuration flag and the actual user data survive container recreation or upgrades. If you have already lost data and the flag file exists but the user data directory is empty, you may need to manually remove the .iris-configured flag file from ./volumes/iris before restarting the container, so the initialization script runs again and IRIS is properly set up [[docker-entrypoint.sh](https://github.com/langgenius/dify/blob/aa7fe42615b7d0fd4a8fe638e8d57a5959a7f7a8/docker/iris/docker-entrypoint.sh#L4-L38)]. Always back up your volumes before making changes to avoid accidental data loss. For production, double-check permissions on your host directories and avoid using docker compose down --volumes, which deletes all data [[discussion](https://github.com/langgenius/dify/discussions/29165)]. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/1103c2ab-4dc4-46ca-bc56-09c0710f9564?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/1103c2ab-4dc4-46ca-bc56-09c0710f9564?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/1103c2ab-4dc4-46ca-bc56-09c0710f9564?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/1103c2ab-4dc4-46ca-bc56-09c0710f9564?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/1103c2ab-4dc4-46ca-bc56-09c0710f9564?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/1103c2ab-4dc4-46ca-bc56-09c0710f9564?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/1103c2ab-4dc4-46ca-bc56-09c0710f9564?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Your%20data%20loss%20is%20happening%20because%20the%20IRIS%20Docker%20service%20only%20mounts%20./volumes/iris%20to%20/opt/iris%2C%20but%20IRIS%20actually%20stores%20user%20namespace%20data%20%28including%20indexed%20documents%29%20in%20/usr/irissys/mgr/user%2C%20which%20is%20not%20persisted%20by%20this%20mount.%20When%20you%20recreate%20or%20upgrade%20the%20container%2C%20that%20directory%20is%20wiped%2C%20so%20all%20your%20data%20is%20lost.%20Meanwhile%2C%20the%20initialization%20flag%20file%20%28/opt/iris/.iris-configured%29%20persists%20in%20the%20mounted%20volume%2C%20so%20the%20entrypoint%20script%20skips%20re-initialization%E2%80%94even%20though%20the%20actual%20data%20is%20missing%E2%80%94leaving%20IRIS%20in%20an%20inconsistent%20state%20where%20it%20appears%20configured%20but%20has%20no%20data%20%5B%5Bdocker-compose.yaml%5D%28https%3A//github.com/langgenius/dify/blob/aa7fe42615b7d0fd4a8fe638e8d57a5959a7f7a8/docker/docker-compose.yaml%23L1340-L1354%29%5D.%0A%0ATo%20fix%20this%2C%20you%20need%20to%20persist%20the%20IRIS%20data%20directory%20by%20adding%20a%20volume%20mount%20for%20/usr/irissys/mgr/user.%20For%20example%2C%20add%20this%20to%20your%20IRIS%20service%20in%20docker-compose.yaml%3A%0A%0A%60%60%60yaml%0Avolumes%3A%0A%20%20-%20./volumes/iris%3A/opt/iris%0A%20%20-%20./volumes/iris-user%3A/usr/irissys/mgr/user%0A%20%20-%20./iris/iris-init.script%3A/iris-init.script%0A%20%20-%20./iris/docker-entrypoint.sh%3A/custom-entrypoint.sh%0A%60%60%60%0A%0AThis%20ensures%20both%20the%20configuration%20flag%20and%20the%20actual%20user%20data%20survive%20container%20recreation%20or%20upgrades.%0A%0AIf%20you%20have%20already%20lost%20data%20and%20the%20flag%20file%20exists%20but%20the%20user%20data%20directory%20is%20empty%2C%20you%20may%20need%20to%20manually%20remove%20the%20.iris-configured%20flag%20file%20from%20./volumes/iris%20before%20restarting%20the%20container%2C%20so%20the%20initialization%20script%20runs%20again%20and%20IRIS%20is%20properly%20set%20up%20%5B%5Bdocker-entrypoint.sh%5D%28https%3A//github.com/langgenius/dify/blob/aa7fe42615b7d0fd4a8fe638e8d57a5959a7f7a8/docker/iris/docker-entrypoint.sh%23L4-L38%29%5D.%0A%0AAlways%20back%20up%20your%20volumes%20before%20making%20changes%20to%20avoid%20accidental%20data%20loss.%20For%20production%2C%20double-check%20permissions%20on%20your%20host%20directories%20and%20avoid%20using%20docker%20compose%20down%20--volumes%2C%20which%20deletes%20all%20data%20%5B%5Bdiscussion%5D%28https%3A//github.com/langgenius/dify/discussions/29165%29%5D.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/31860)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#22034