14021:M 15 Aug 2023 15:55:18.285 # Server initialized
14021:M 15 Aug 2023 15:55:18.285 * Ready to accept connections
14021:M 15 Aug 2023 15:55:27.866 * 1 changes in 5 seconds. Saving...
14021:M 15 Aug 2023 15:55:27.867 * Background saving started by pid 14036
14036:C 15 Aug 2023 15:55:27.868 * DB saved on disk
14021:M 15 Aug 2023 15:55:27.967 * Background saving terminated with success
14021:M 15 Aug 2023 15:55:33.715 * 1 changes in 5 seconds. Saving...
14021:M 15 Aug 2023 15:55:33.716 * Background saving started by pid 14042
14042:C 15 Aug 2023 15:55:33.723 * DB saved on disk
14021:M 15 Aug 2023 15:55:33.817 * Background saving terminated with success
step5. 查看日志指定的路径下是否存在rdb日志文件
(base) root@yuanhong section6-3 % ls
my_dump.rdb redis.conf
(base) root@yuanhong section6-3 % docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9e2f67eb841d redis:latest "docker-entrypoint.s…" 2 seconds ago Up 1 second 6379/tcp redis-server
step3. 进入容器确认数据
(base) root@yuanhong section6-3 % docker exec -it redis-server /bin/bash
root@9e2f67eb841d:/data# redis-cli
127.0.0.1:6379> GET empID
"001"
127.0.0.1:6379> GET empName
"Mike1"