切换rdb到aof
redis-cli 登录redis,然后通过命令,激活aof持久化
127.0.0.1:6379> CONFIG set appendonly yes #用命令激活aof持久化(临时生效,注意写入到配置文件)
OK
127.0.0.1:6379>
127.0.0.1:6379>
127.0.0.1:6379> CONFIG SET save "" #关闭rdb持久化
切换rdb到aof
redis-cli 登录redis,然后通过命令,激活aof持久化
127.0.0.1:6379> CONFIG set appendonly yes #用命令激活aof持久化(临时生效,注意写入到配置文件)
OK
127.0.0.1:6379>
127.0.0.1:6379>
127.0.0.1:6379> CONFIG SET save "" #关闭rdb持久化