2026 Dify Self-Hosted Backups: How to Do Them and What to Check Before Recovery

2026 Dify Self-Hosted Backups: How to Do Them and What to Check Before Recovery

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:

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:

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:

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:

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:

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

From deployment notes to configuration checks

Choose a server based on memory, storage, and network requirements. The customer manages the operating system and data backups.