如何避免在单台计算机上使用MongoDB导致服务器故障时丢失数据? [英] How to avoid data loss on server failure with MongoDB on a single machine?

查看:223
本文介绍了如何避免在单台计算机上使用MongoDB导致服务器故障时丢失数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我了解到mongoDB不会立即将数据写入磁盘,而是定期执行.

I have read that mongoDB don't write data to disk right away, it does this periodically.

关于如何处理此问题的任何想法?

Any thoughts on how to deal with this?

推荐答案

您可以使用--journal启用日记功能.

You can enable journaling with --journal.

查看 http://www.adathedev. co.uk/2011/03/mongodb-journaling-performance-single.html 查看全文

相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆