Your Dify containers start after a move, but the knowledge base or credentials do not work.
The fastest safe approach is to back up every data store and the deployment configuration your actual instance uses, then test the restore in an isolated environment. An app DSL export or database copy alone is not a complete instance backup.
This guide is for independent developers preparing a Dify update or server move.
It is also for small teams protecting workflows, credentials, and knowledge-base data.
Technical leads can use it to turn recovery checks into a repeatable handover process.
Last updated November 2, 2026; the release and backup scope were checked against Dify’s official release notes and the deployment files for the version being discussed.
Check completeness: map every component in your backup
Treat the backup as a set of related components, not one file. The exact set depends on your deployment, enabled services, and storage settings. Inspect your Compose configuration and environment files before deciding what belongs in the backup.
Dify’s official releases list version 1.18.0 as published on October 23, 2026. Its upgrade guidance identifies the database, vector storage data, uploaded files, Agent-related storage, and deployment secrets as items to consider before an upgrade. That is a version-specific reference, not proof that every earlier release uses the same structure or procedures. Check the official release notes for the version you run.
For each enabled component, record its purpose and actual storage location:
- Database: application records, workflow configuration, accounts, and references to other data. Confirm the database type and its supported backup method.
- Vector storage: indexed knowledge-base data, where your deployment uses a separate vector store. Record the selected backend and its own backup procedure.
- Uploaded files: source documents and other files referenced by applications. Find the actual mounted path or volume; do not assume the database contains the file contents.
- Agent-related storage: include this when the deployed version and configuration use it. Verify the relevant volume or external storage instead of assuming it is always present.
- Deployment definition and environment: keep the Compose files, image versions, non-secret environment settings, and any custom configuration needed to recreate the deployment.
- Secrets and service credentials: protect the encryption-related keys and credentials that your running instance depends on. Store them with restricted access, not in a public repository.
An app DSL export has a narrower purpose. Dify’s DSL export implementation concerns application definition export. Do not treat that export as a copy of the database, uploaded files, vector index, or full deployment environment. A DSL export can be useful for moving an application definition; it does not by itself prove that the full instance can be restored.
To map the deployment, start with the Compose file and the environment example that matches your release. The Dify Compose definition and environment template can help you identify services and configuration values, but main may differ from your installed release. Prefer the files shipped with your pinned version.
Run an inventory command from the directory containing your deployment file:
docker compose config --services
docker compose config --volumes
Compare the output with your own notes. Service and volume names vary by configuration; the example below is only a recording format, not a guaranteed Dify output:
Services:
- <database service>
- <application service>
- <vector service, if enabled>
Volumes:
- <database volume>
- <uploads volume>
- <vector volume, if enabled>
Docker volumes persist data outside a container’s writable layer, but persistence is not the same as a backup. Use the Docker documentation on volumes to identify how your deployment stores data, then verify that your backup method actually captures those locations.
Check consistency across database, vector, and file data
A useful backup preserves the relationship between database records, knowledge-base indexes, and original files. If one component comes from a different point in time, the service may start while documents, references, or retrieval results are incomplete.
A database-specific backup does not automatically make the other components consistent with it. For example, PostgreSQL’s version 16 pg_dump documentation describes a logical backup tool for PostgreSQL databases. It does not say that a separate vector store or file volume is captured by that database dump. Likewise, a vector-store snapshot is not a substitute for the database and source files.
Use this framework before taking a backup:
- Confirm service health. Check that the database, vector service, and file storage are reachable. Resolve existing errors before capturing a state you may later need to restore.
- Choose a write-control method. For a maintenance window, stop or restrict application writes using a procedure supported by your Dify version. If writes must continue, confirm that each service’s supported backup method can meet your consistency requirement.
- Back up each component using its own supported method. Use a database backup tool for the database and the storage provider’s documented method for files and vector data.
- Record the capture context. Save the Dify image versions, Compose and environment configuration, vector-store type, and any maintenance action taken.
- Check the resulting artifacts. Confirm that expected files exist, are readable by the authorized restore account, and have not been silently excluded by a path or volume mismatch.
Do not make a live copy of a database’s data directory your default backup method. A direct filesystem copy while the database is active may capture an inconsistent state. Follow the database’s supported backup process and check its documentation for the version you actually run.
For Qdrant deployments, consult its snapshot documentation and confirm that the procedure matches your installed version and configuration. If you use a different vector backend, use that backend’s documentation instead. Do not copy Qdrant steps to another storage engine.
A backup is not complete just because every command returned without an obvious error. You still need to prove that the captured database, vector data, files, configuration, and secrets work together after restoration.
Protect decryptability with matching configuration and secrets
A restored application can launch successfully and still be unusable. If a required encryption key is missing or does not match the restored configuration, stored credentials may not be available to workflows. That is a different failure from a container that cannot start.
Before the backup, confirm that:
- Every required environment file and custom configuration file is included in the protected backup set.
- Encryption-related keys and external service credentials are preserved through an approved secure process.
- The restore operator can read the files, but ordinary users and public repositories cannot.
- The restored deployment uses the matching configuration and secrets rather than regenerating them as a routine recovery step.
- Any credentials that must be supplied by an administrator are documented as restore prerequisites.
Keep a protected inventory of secret names and their purpose, not a plaintext secret dump in an ordinary handover document. For example, record that a key is required and where the approved secret store keeps it. If you cannot recover a required key, stop and assess the impact before attempting a reset. A reset may prevent access to data encrypted under the previous value.
Review the environment file for values that affect storage type, database connectivity, external services, and mounted paths. Do not copy a current upstream template over a version-pinned production environment without comparing the changes. The Dify environment template is a reference; your actual deployed file remains the source for your instance’s settings.
Separate migration from upgrade with a version-matched restore
A server move and a software upgrade are different changes. Combining them makes it harder to identify whether a failure came from missing data, a changed path, a secret mismatch, or an incompatible version.
For the initial recovery test, use an isolated environment that matches the original Dify image versions and relevant storage configuration. Do not connect it to production traffic or let it send real external actions. Once same-version recovery passes, plan an upgrade separately against the target release’s official instructions.
Compare these items before restoring elsewhere:
- Compose definition: check service definitions, volume declarations, and any local overrides.
- Image versions: use the versions recorded for the source deployment during the first restore test.
- Mount paths: confirm that each database, upload, vector, and Agent-related data location maps to the intended destination.
- Storage backend: verify that the target uses the same vector-store type or has a documented migration procedure.
- Custom environment variables: compare the restored configuration with the source inventory, including connection settings and secrets.
- Network and external services: make sure required endpoints and credentials are available in the test environment without exposing production systems.
The release notes for Dify 1.18.0 are useful for understanding that release’s upgrade context, but they are not a universal migration recipe. Check the notes for your source and target versions before changing database structure or moving data. If the destination has a different storage backend, test that migration as a separate project rather than assuming a normal restore will convert it.
Prove Dify data recovery through business-function tests
Run the restore test where it cannot affect production. Restore the data and configuration using the procedure you plan to rely on, then test business functions rather than stopping at a green container status.
Use this validation sequence:
- Service startup: check that all required services start and remain healthy. Inspect logs for database connection, storage mount, and secret-related errors.
- Configuration and access: confirm that an authorized test user can sign in and that expected application settings are present.
- Application behavior: run a representative workflow with safe test inputs. Check both the expected result and any required integration credentials.
- Knowledge-base behavior: select a document known to exist in the backup, confirm that its source file is present, and test retrieval through the restored application.
- Data relationships: check that the database references point to available files and that the vector data corresponds to the restored knowledge base.
- Handover record: document the source and target versions, files restored, configuration needed, test results, and any manual recovery actions.
A successful container start is only a service check. It does not demonstrate that a workflow can use its credentials or that a knowledge-base query returns the expected content. If a test fails, record the missing component, correct the backup scope or restore process, and repeat the isolated test before declaring the backup usable.
For a repeatable test, keep the command and result together. For example, this inventory command helps you compare the configured services before and after restoration:
docker compose config --services
Record the actual output for your deployment rather than copying a sample list from another installation. Use a separate check for database integrity, file availability, and vector retrieval; the Compose service list cannot establish those results.
Match storage capacity to measured deployment data
Before choosing a server, measure the database, uploaded files, vector storage, and the backup copies you intend to retain. Add their actual sizes and account for the growth and retention policy you have chosen. Do not estimate backup capacity from the application container size alone.
A simple planning model is:
Required storage =
live database
+ uploaded files
+ vector data
+ retained backup copies
+ planned growth reserve
Use measured values from your deployment. The formula is a planning aid, not a guarantee of usable capacity. Confirm filesystem overhead, any RAID or replication design you manage yourself, and whether the destination for backup copies is genuinely independent of the server being protected.
The AmdSrv machine specifications list two 1 TB NVMe drives as the standard storage arrangement, with an option to add up to two 2 TB NVMe drives; verify the current AmdSrv machine specifications before ordering. The drives are direct-attached, so local capacity does not provide an off-site copy or a backup service. Keep at least one recovery copy in a separate location under a process you control.
| Backup approach | What it can protect | Main limitation | Suitable decision |
|---|---|---|---|
| App DSL export | Application definition, for supported export and import use | Not a full copy of database records, files, vector data, or deployment secrets | Use for app-level portability, not instance recovery |
| Database-only backup | Database contents captured by the database’s supported tool | Does not automatically include separate vector storage or uploaded files | Use as one component of a broader backup set |
| Full component set with configuration | Database, enabled storage components, deployment files, and required secrets | Cross-service consistency still needs a controlled capture and a restore test | Use when you need to recover or migrate the self-hosted instance |
| Isolated restore rehearsal | Tests whether the saved components work together in practice | Does not replace regular backups or prove future changes are covered | Use to validate the recovery procedure before relying on it |
If your measured data and retained copies exceed the local capacity you are considering, compare the actual storage options and billing terms in the AmdSrv price list before selecting a server. A dedicated machine can give your Dify deployment its own resources and local NVMe storage, but it does not provide an off-site backup, snapshots, or managed recovery. Keep backup copies elsewhere, and choose AmdSrv only if the dedicated-server capacity and operating model fit your workload better than a shared VPS or a short-lived cloud instance.
Further reading
AmdSrv Dedicated Server with AMD EPYC 7543P, from $458/month
