Redis RDB和AOF

By default Redis asynchronously dumps the dataset on disk. This mode is good enough in many applications, but an issue with the Redis process or a power outage may result into a few minutes of writes lost (depending on the configured save points).

The Append Only File is an alternative persistence mode that provides much better durability. For instance using the default data fsync policy (see later in the config file) Redis can lose just one second of writes in a dramatic event like a server power outage, or a single write if something wrong with the Redis process itself happens, but the operating system is still running correctly.

AOF and RDB persistence can be enabled at the same time without problems. If the AOF is enabled on startup Redis will load the AOF, that is the file with the better durability guarantees.


默认情况下 Redis 异步转储数据在磁盘。这个模式是足够好了在很多应用,

但是有一个问题Redis process或者一个断电可能导致几分钟写丢失(取决于配置的save points).


The Append Only File 是另一种持久化模式提供更多的持久性。

对于实例使用默认的数据fsync策略

Redis 可以只丢失写的一秒在一个戏剧性的问题像一个断电,

或者一个单独的写如果有一些错误Redis 本身遇到的,但是操作系统仍旧运行正确。

AOF 和RDB 持久化可以同时启动没有问题。

如果AOF 是启用的在Redis启动时会加载AOF

你可能感兴趣的:(Redis,官方文档)