How to find Redis data directory
To find the data directory in redis, run the command
1 |
redis-cli config get dir |
Redis data directory is specified in the configuration file
1 |
/etc/redis/redis.conf |
The entry is
1 |
dir /var/lib/redis |
redis data directory should be owned by user redis
1 |
chown redis:redis /var/lib/redis |
Example
1 2 3 4 5 6 7 |
[root@server redis]# cd /var/lib/redis/ [root@server redis]# ls -la total 12 drwxrwx--- 2 redis redis 4096 Dec 2 06:44 . drwxr-xr-x. 37 root root 4096 Nov 20 17:30 .. -rw-r--r-- 1 redis redis 92 Dec 2 06:44 dump.rdb [root@server redis]# |
See Redis