在C#中运行MongoDump/MongoRestore [英] Run MongoDump / MongoRestore in C#
本文介绍了在C#中运行MongoDump/MongoRestore的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有使用C#驱动程序运行这些命令的简便方法?我发现的唯一文档涉及将EXE作为进程运行,这似乎有点繁琐.
Is there an easy way to run these commands using the C# driver? The only documentation I found involves running the EXE as a process etc, which seems a bit heavy.
我发现的唯一相关问题仍未得到解答...我在这里遗漏了一些基本知识吗?
The only related question I found was unanswered... am I missing something fundamental here?
http://grokbase.com/t/gg/mongodb-user/127zntq9pr/mongodump-in-c
推荐答案
mongodump和mongorestore是应用程序,而不是MongoDB命令,这就是为什么您必须运行可执行文件的原因.
mongodump and mongorestore are applications, not MongoDB commands which is why you would have to run the executable.
If interested, the C++ code for dumping a database is located here.
这篇关于在C#中运行MongoDump/MongoRestore的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文