英文:
Set the snapshot frequency for Memgraph Platform?
问题
如何更改Memgraph Platform的快照频率?我正在运行最新的Docker版本的平台(MG 2.7)。
英文:
How can I change the snapshot frequency for Memgraph Platform? I'm running the latest Docker version of the Platform (MG 2.7).
答案1
得分: 1
请按以下步骤操作以完成此任务:
-
在 Memgraph 配置文件中进行修改。因为您正在运行 Docker,所以需要执行一些复制/编辑/复制回的操作:
docker run -it -p 7687:7687 -p 7444:7444 -p 3000:3000 -e MEMGRAPH="--log-level=TRACE"
-v mg_lib:/var/lib/memgraph
-v mg_log:/var/log/memgraph
-v mg_etc:/etc/memgraph
memgraph/memgraph-platform -
找到 Memgraph Docker 的
CONTAINER ID
:docker ps
-
将配置文件从容器复制到您的本地计算机:
docker cp
:/etc/memgraph/memgraph.conf memgraph.conf -
使用文本编辑器打开配置文件,并修改
--snapshot-interval-sec
选项以设置所需的快照频率(以秒为单位)。保存对配置文件的更改。 -
将修改后的配置文件复制回容器:
docker cp memgraph.conf
:/etc/memgraph/memgraph.conf
现在重新启动 Docker,您的新配置将会生效。
英文:
To do this you'll need to modify the Memgraph configuration file. Since you are running a Docker it will involve some copy/edit/copy back operations:
-
Start Memgraph Platform with including the
-v mg_etc:/etc/memgraph
flag:docker run -it -p 7687:7687 -p 7444:7444 -p 3000:3000 -e MEMGRAPH="--log-level=TRACE"
-v mg_lib:/var/lib/memgraph
-v mg_log:/var/log/memgraph
-v mg_etc:/etc/memgraph
memgraph/memgraph-platform -
Find the
CONTAINER ID
of the Memgraph Docker:docker ps
-
Copy the configuration file from the container to your local machine:
docker cp <CONTAINER ID>:/etc/memgraph/memgraph.conf memgraph.conf
-
Open the configuration file with a text editor, and modify the
--snapshot-interval-sec
option to set the desired snapshot frequency in seconds. Save the changes to the configuration file. -
Copy the modified configuration file back to the container:
docker cp memgraph.conf <CONTAINER ID>:/etc/memgraph/memgraph.conf
Now restart the docker and your new configuration will be loaded.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论