当前位置:网站首页>Redis 持久化机制
Redis 持久化机制
2022-07-06 15:35:00 【InfoQ】
怎么保证 Redis 挂掉之后再重启数据可以进行恢复?
什么是 RDB 持久化?
redis.confsave 900 1 #在900秒(15分钟)之后,如果至少有1个key发生变化,Redis就会自动触发BGSAVE命令创建快照。
save 300 10 #在300秒(5分钟)之后,如果至少有10个key发生变化,Redis就会自动触发BGSAVE命令创建快照。
save 60 10000 #在60秒(1分钟)之后,如果至少有10000个key发生变化,Redis就会自动触发BGSAVE命令创建快照。
什么是 AOF 持久化?
appendonly yes
server.aof_bufappendfsyncappendonly.aofappendfsync always #每次有数据修改发生时都会写入AOF文件,这样会严重降低Redis的速度
appendfsync everysec #每秒钟同步一次,显式地将多个写命令同步到硬盘
appendfsync no #让操作系统决定何时进行同步appendfsync everysec边栏推荐
- 【编译原理】做了一半的LR(0)分析器
- ICLR 2022 | pre training language model based on anti self attention mechanism
- const关键字
- Uniapp setting background image effect demo (sorting)
- POJ 1258 Agri-Net
- The difference between enumeration and define macro
- pytorch_YOLOX剪枝【附代码】
- How to use flexible arrays?
- Aardio - construct a multi button component with customplus library +plus
- 视图(view)
猜你喜欢
随机推荐
NPDP certification | how do product managers communicate across functions / teams?
2022-07-04 the high-performance database engine stonedb of MySQL is compiled and run in centos7.9
Extern keyword
cuda 探索
软考高级(信息系统项目管理师)高频考点:项目质量管理
案例推荐丨安擎携手伙伴,保障“智慧法院”更加高效
金融人士必读书籍系列之六:权益投资(基于cfa考试内容大纲和框架)
MySQL authentication bypass vulnerability (cve-2012-2122)
Cocoscreator+typescripts write an object pool by themselves
Mysql 身份认证绕过漏洞(CVE-2012-2122)
signed、unsigned关键字
欧洲生物信息研究所2021亮点报告发布:采用AlphaFold已预测出近1百万个蛋白质
memcached
UVa 11732 – strcmp() Anyone?
Leetcode: interview question 17.24 Maximum cumulative sum of submatrix (to be studied)
NPDP认证|产品经理如何跨职能/跨团队沟通?
QT signal and slot
Classification, function and usage of MySQL constraints
ICLR 2022 | 基于对抗自注意力机制的预训练语言模型
How big is the empty structure?








