The documentation page that discusses Redis persistence is
https://redis.io/topics/persistenceIt's not the easiest page to find on the site, but it is listed in the logical place (the page you reach when you click "Documentation" in the list of topics at the top of
https://redis.io/)
There are two forms of persisting data to disk: A "snapshot" (RDB) file, and an append-only file (AOF).
(actually there are two more forms: no persistence at all, which can be appropriate for mere caches, and attaching another Redis as a slave and configuring that other Redis to save on disk)
The information you're asking about is spread out a little on the persistence page, so here's the summary pulled together:
From the first two bullet points at the top of the page:
- The RDB persistence performs point-in-time snapshots of your dataset at specified intervals.
- the AOF persistence logs every write operation received
by the server, that will be played again at server startup,
reconstructing the original dataset.
The replay/reload of data from the file on disk is mentioned in the context of the Append-Only File (AOF). It should also be mentioned for the RDB snapshot file, because Redis will reload from the snapshot file in the same way. For confirmation of this, see the description of the SHUTDOWN command (
https://redis.io/commands/shutdown).
Now scroll down the persistence page to the "Snapshotting" header (
https://redis.io/topics/persistence#snapshotting) for descriptions of the configuration file parameters that control the snapshot and aof actions. In between on that page is some discussion of the benefits and drawbacks of the two forms of persistence.
Please be aware that snapshots of a large Redis dataset can make a disk drive very busy. There is a huge difference in speed between RAM and disk (see
this post for a comparison), and the speed difference can saturate the I/O capacity of the disk. If the disk serves the rest of the server, like the root filesystem or swap space, the saturation can have greater effects than you expect. If your Redis dataset is large, then it's often a good idea to dedicate a disk to the Redis persistence file(s) or make sure the shared disk has a great deal of I/O capacity.