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:
- Transient caches for performance - Authentication tokens, session data, and frequently accessed query results that can be regenerated
- Transient bookkeeping for background tasks - Metadata that isn't important to keep long-term
- Background work queues - Task queues that will generally be cleared within a minute or two of finishing workloads
- 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.
Recommended Migration/Recovery Process
If you need to migrate to new Redis instances or recover from Redis data loss:
- Spin down Prefect workloads - Stop any active workers or deployments
- Wait a few minutes - Give the system time to finish all backend processing
- Redeploy with new Redis settings - Point to empty Redis instances
- 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).
Related Documentation
- Infrastructure Services - Overview of Redis role in the stack
- Troubleshooting - Recovery procedures for service failures
- Backup and Disaster Recovery - General backup strategy