8月 082017
 
  1. redis.conf 中默认配置的dir为 “./” ,即为当前目录,一些人会想当然认为是redis.conf 所在目录,而appendonly.aof 默认写在该dir下; 其实,”./” 为进程的cwd
  2. redis的config set dir命令可以修改redis进程的cwd
  3. redis的appendonly.aof 的位置会参考在config appendonly yes 被执行时的dir的值,在config appendonly yes后修改dir的值不会立即生效

遇到过的问题:

  1. 程序一直在tail -f 的方式同步appendonly.aof ,在下午18:16的时候,appendonly.aof 变到了/tmp/appendonly.aof (原本下意识地认为/tmp/appendonly.aof 只是18:16之后的数据,行文至此,才意识到,/tmp/appendonly.aof中不是18:16后的数据,而是全部数据);目前确认进程没有被重启过,目前能够想到的能够完成这个切换的操作为:

    但是似乎没有谁会去执行这么复杂的命令
 Posted by at 下午 6:25

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据