Search code examples
dockerredisbackupvolume

When does Docker Redis store on a volume?


When does Docker Redis store on a volume? That store it on a volume every command?

I want to know when Redis will be backed up.


Solution

  • Redis persists data to disk based on configuration. There are config options to persist every command or periodically and in different formats (RDB or AOF). To understand how Redis data gets backed up, please go thru this link https://redis.io/docs/management/persistence/.

    In your case, since Redis is running inside Docker container make sure to mount a volume that is outside container. Otherwise data will be lost after container restart.