General DiscussionCan I upgrade directly from Dify v1.9.2 to v1.16.1 while preserving all data? #39678
Replies: 1 comment
|
Yes, a direct upgrade from v1.9.2 to v1.16.1 is supported — Dify's Alembic-based migration system handles sequential schema changes automatically, and no incremental upgrades are needed. All your data (apps, conversations, knowledge bases, workflows) will be preserved [1]. In fact, this is essentially the same upgrade path you asked about previously in discussion #39009, just targeting 1.16.1 instead of 1.15.0. Here are the complete steps: 1. Back up everything first: docker compose exec db pg_dump -U postgres dify > dify_backup_1.9.2.sql
cp -r ./volumes ./volumes_backup2. Pull new images and restart: cd docker
git pull
docker compose pull
docker compose up -d3. Run database migration (runs automatically on startup if docker compose exec api flask upgrade-db4. Run the plugin backfill (required when upgrading past 1.15.0 — must be run manually) [2]: docker compose exec api flask backfill-plugin-auto-upgrade5. Apply the -- Run for each table: provider_models, provider_model_credentials,
-- tenant_default_models, provider_model_settings, load_balancing_model_configs
UPDATE provider_models SET model_type = 'llm' WHERE model_type = 'text-generation';
UPDATE provider_models SET model_type = 'text-embedding' WHERE model_type = 'embeddings';
UPDATE provider_models SET model_type = 'rerank' WHERE model_type = 'reranking';
-- (repeat the same 3 UPDATE statements for the other 4 tables)
6. Clean up stale plugin directories from Breaking changes to watch for between 1.9.2 and 1.16.1:
Compare the new To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
Uh oh!
There was an error while loading. Please reload this page.
Self Checks
Content
I currently deploy Dify v1.9.2 via docker-compose and use the built-in PostgreSQL with pgvector. I need to retain all existing application, conversation and knowledge base data after the upgrade.
My main business scenarios: Chat Apps, Knowledge Base and Workflows.
I have several questions:
Is direct upgrade from v1.9.2 to v1.16.1 supported? Are there any known database migration compatibility risks?
If a direct upgrade is not recommended, do I need to upgrade incrementally (e.g. upgrade to v1.15.0 first, then upgrade to v1.16.1)?
Could you provide the complete safe upgrade steps to prevent data loss?
Are there breaking changes in configuration, environment variables or docker-compose files I need to pay attention to?
Deployment information:
Deployment way: docker-compose
Database: Default PostgreSQL container with pgvector
No external vector database
Thanks for your advice.
All reactions