Will the previous version data disappear when upgrading the version? #8749

Closed
opened 2026-02-21 18:27:23 -05:00 by yindo · 2 comments
Owner

Originally created by @Zhujing1215 on GitHub (Feb 28, 2025).

Self Checks

  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Provide a description of requested docs changes

I want to upgrade from V0.15.3 to V1.0.0. Should I modify docker-compose.yaml directly? Will the previous model configuration, agent and other data disappear? Or do I need to copy and save my mount path?

Originally created by @Zhujing1215 on GitHub (Feb 28, 2025). ### Self Checks - [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 report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Provide a description of requested docs changes I want to upgrade from V0.15.3 to V1.0.0. Should I modify docker-compose.yaml directly? Will the previous model configuration, agent and other data disappear? Or do I need to copy and save my mount path?
yindo added the 🙋‍♂️ question label 2026-02-21 18:27:23 -05:00
yindo closed this issue 2026-02-21 18:27:24 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Feb 28, 2025):

There are a few important steps to ensure your data is preserved when upgrading from Dify V0.15.3 to V1.0.0:

  1. Data Storage Locations: The default data storage locations for Dify in a Docker environment are the Docker volumes. To preserve these during an upgrade, you should copy all the volumes from the original Dify version's Docker folder to the new version's volume folder using the command:

    cp -r docker/old_folder_volume docker/new_folder_volume
    

    Additionally, mark the dify-db-1 volume as external in your docker-compose.yaml file to prevent it from being removed when executing docker compose down [1].

  2. Data Migration: Use the vdb-migrate command to migrate the vector database. This command includes functions like migrate_annotation_vector_database and migrate_knowledge_vector_database to handle different types of data migrations [2].

  3. Docker Compose Changes: You will need to update your docker-compose.yaml file. Notably, environment variables are now managed through a .env file, which is mandatory for running docker compose up. Ensure you sync your .env file with any updates from the .env.example file [3].

  4. Backup Functionality: Dify provides export functionality for model configurations and agent data. You can export applications in DSL format, which includes basic descriptions, model parameters, and orchestration configurations. However, this does not include authorization information like API keys [4].

By following these steps, you can upgrade without losing your existing data.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Feb 28, 2025): <!-- Answer --> There are a few important steps to ensure your data is preserved when upgrading from Dify V0.15.3 to V1.0.0: 1. **Data Storage Locations**: The default data storage locations for Dify in a Docker environment are the Docker volumes. To preserve these during an upgrade, you should copy all the volumes from the original Dify version's Docker folder to the new version's volume folder using the command: ```bash cp -r docker/old_folder_volume docker/new_folder_volume ``` Additionally, mark the `dify-db-1` volume as external in your `docker-compose.yaml` file to prevent it from being removed when executing `docker compose down` <sup>[[1]](https://github.com/langgenius/dify/issues/13791)</sup>. 2. **Data Migration**: Use the `vdb-migrate` command to migrate the vector database. This command includes functions like `migrate_annotation_vector_database` and `migrate_knowledge_vector_database` to handle different types of data migrations <sup>[[2]](https://github.com/langgenius/dify/blob/main/api/commands.py)</sup>. 3. **Docker Compose Changes**: You will need to update your `docker-compose.yaml` file. Notably, environment variables are now managed through a `.env` file, which is mandatory for running `docker compose up`. Ensure you sync your `.env` file with any updates from the `.env.example` file <sup>[[3]](https://github.com/langgenius/dify/blob/main/docker/README.md)</sup>. 4. **Backup Functionality**: Dify provides export functionality for model configurations and agent data. You can export applications in DSL format, which includes basic descriptions, model parameters, and orchestration configurations. However, this does not include authorization information like API keys <sup>[[4]](https://github.com/langgenius/dify-docs/blob/main/jp/guides/management/app-management.md)</sup>. By following these steps, you can upgrade without losing your existing data. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/bbd54f8f-ceca-4cde-8d65-a828747c4892?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/bbd54f8f-ceca-4cde-8d65-a828747c4892?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/bbd54f8f-ceca-4cde-8d65-a828747c4892?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/bbd54f8f-ceca-4cde-8d65-a828747c4892?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/bbd54f8f-ceca-4cde-8d65-a828747c4892?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/bbd54f8f-ceca-4cde-8d65-a828747c4892?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/bbd54f8f-ceca-4cde-8d65-a828747c4892?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Feb 28, 2025):

https://github.com/langgenius/dify/releases/tag/1.0.0 Please backup your data before upgrading.

@crazywoola commented on GitHub (Feb 28, 2025): https://github.com/langgenius/dify/releases/tag/1.0.0 Please backup your data before upgrading.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#8749