Skip to content

Redis Backup and Persistence

Do I need to back up Redis?

Short answer: No, you don't strictly need to retain Redis data.

Redis in Customer-Managed Prefect contains mostly caches and transient background tasks. The data stored in Redis is not critical for system recovery.

What's in Redis?

Redis contains four major categories of transient data:

  1. Transient caches for performance - Authentication tokens, session data, and frequently accessed query results that can be regenerated
  2. Transient bookkeeping for background tasks - Metadata that isn't important to keep long-term
  3. Background work queues - Task queues that will generally be cleared within a minute or two of finishing workloads
  4. Event streams - Held for their retention period, but not negative to drop

All of this data is either regenerable or ephemeral. Losing it will not cause permanent data loss.

If you need to migrate to new Redis instances or recover from Redis data loss:

  1. Spin down Prefect workloads - Stop any active workers or deployments
  2. Wait a few minutes - Give the system time to finish all backend processing
  3. Redeploy with new Redis settings - Point to empty Redis instances
  4. Things come back to normal automatically - Caches rebuild, queues repopulate

What About Backups?

While Redis doesn't strictly need backups, your managed Redis service may provide automated snapshots. These can be useful for:

  • Quick recovery from accidental data corruption
  • Reducing downtime during migrations
  • Development/testing environments where rebuilding caches is inconvenient

However, Redis backups are optional and supplementary. The critical backup priority is PostgreSQL, which contains all durable workflow data (flows, runs, deployments, events).