当前位置:网站首页>Redis持久化机制RDB、AOF
Redis持久化机制RDB、AOF
2022-07-24 00:14:00 【一只小小狗】
Redis持久化机制RDB、AOF、混合持久化
默认开启的是RDB
如果配置同时开启了RDB和AOF ,数据恢复Redis会优先选择AOF恢复。
RDB
Redis默认持久化方式,按照一定周期策略将内存数据持久化到二进制文件中,产生对应的dump.rdb文件中。默认通过bgsave实现异步存储。
bgsave 写时复制机制
在生成快照中,依然可以执行写命令。如果在此时修改数据,那么这块数据就会被复制一份,生成的数据副
本。bgsave会把子进程写入这个文件,而主线程依然可以直接修改原来的数据。
AOF
将受到的命令通过Write函数追加到文件最后,类似于Mysql中的bin log,当Redis重启时会重写直线文件中保存的写命令来在内存中重建整个数据库的内容。
并且推荐默认为每秒执行一次,写入AOF文件,故障时也值丢失一秒的数据。
如有错误欢迎指正
边栏推荐
- Mysql database foundation
- L2TP的LAC自动拨号实验
- FPGA——SPI总线控制flash(3)含代码
- Tool recommendation - YuQue
- Analysis and resolution of slot conflict in solid delegatecall
- Jenkins 使用sonarqube构建流水线代码审查项目
- kubernetes error
- 复制客服微信号,前往微信添加,拨打电话
- The universal esp32c3 configures partition tables based on the Arduino ide framework
- 2022牛客多校联赛第二场 题解
猜你喜欢
![[Android kotlin] property, getter and setter](/img/f7/a3b79e3f7c4396a240eb5749c450d3.png)
[Android kotlin] property, getter and setter

Deep learning 9 basic concepts of feedforward neural networks

高数_第1章空间解析几何与向量代数__两点距

Esp8266 - at command + network transparent transmission

【细节】radio 标签 ,更换 默认选中的背景色

QT create a background mask, pop up the child window, and the background of the parent window turns black and dark

July 23, 2022 - mapper file description

Space shooting lesson 07: add graphics

Jenkins 使用sonarqube构建流水线代码审查项目

Webrtc 1 to 1 - basic architecture and directory
随机推荐
Qt | 设置部件大小 sizeHint、minimumSizeHint、sizePolicy、stretch factor
尝试新的方法
多表查询之_外连接
在原生终端实现类似 rz、sz 上传下载文件与目录的功能
vulnhub wpwn: 1
Code generation of DGS
JS Learning Notes - - the Underlying Implementation of Array Method
权重分析——CRITIC权重法
mysql数据库基础
Problems encountered in pytorch
腾讯将关闭“幻核”,数字藏品领域发展是否面临阻力?
[for loop if conditional statement] summary
深度学习之 9 前馈神经网络 基本概念
What is restful verb
QT | set part size sizehint, minimumsizehint, sizepolicy, stretch factor
Try new methods
Esp8266 - at command + network transparent transmission
Cloud native concept
2022牛客多校联赛第二场 题解
After openfeign sets circuitbreaker=true, feign's readtimeout expires