Skip to main content

Vector Database Migration

Migrate from Weaviate to another database

  1. Update configuration Source code deployment (.env):
    Docker Compose (docker-compose.yaml):
  2. Run migration
Tested databases: Qdrant, Milvus, AnalyticDB

Storage Migration

Move from local to cloud storage

Migrate files from local storage to cloud providers (e.g., Alibaba Cloud OSS):
  1. Configure cloud storage .env or docker-compose.yaml:
  2. Migrate data Source code:
    Docker:

Data Cleanup

Delete old logs

  1. Get tenant ID
  2. Delete logs older than X days
  3. Remove exported logs (optional)

Remove orphaned files

Warning: Back up database and storage before running. Run during maintenance window.
  1. Clean database records
  2. Delete orphaned files from storage
Note: Only works with OpenDAL storage (STORAGE_TYPE=opendal).

Backup & Recovery

Create backup before upgrade

What to backup

For Docker Compose deployments:
  • Entire dify/docker/volumes directory
For source deployments:
  • Database
  • Storage configuration
  • Vector database data
  • Environment files

Database maintenance

After deleting logs, reclaim storage: PostgreSQL:

Upgrade Process

Version upgrade

Image deployment:
Source code:

Database schema migration

Always required for source code updates:
Last modified on June 10, 2026