RDB

Redis学习笔记(3)

  • save
    同步备份,阻塞。将替换已有的RDB文件
  • bgsave
    阻塞发生在fork中
  • auto
    dbfilename dump-${port}.rdb
    dir /bigdiskpath
    stop -writes-on-bgsave-error yes
    rdbcompression yes
    rdbchecksum yes

不可控,丢失数据

AOF

  • always # 每条
  • everysec # 每秒
  • no # 由系统决定

AOF重写

  • 减少硬盘占用量
  • 加速恢复速度
  • bgrewriteaof
  • AOF重写配置
    appendonly yes
    appendfilename “appendonly-${port}.aof”
    appendfsync everysec
    dir /bigdiskpaht
    no-appendfsync-on-rewrite yes

RDB与AOF

Redis学习笔记(3)

相关文章:

  • 2021-07-22
猜你喜欢
  • 2021-12-27
  • 2022-12-23
  • 2021-08-16
  • 2021-11-13
  • 2021-04-16
  • 2021-10-10
  • 2021-12-19
相关资源
相似解决方案