Is mongorestore command transactional?

56 views
Skip to first unread message

kumar

unread,
May 12, 2012, 5:16:32 PM5/12/12
to mongodb-user

HI All,

I am going to use "mongorestore" command in scheduled tasks,

Is mongorestore command transactional?
When any issue happened in middle of mongorestore, Will it come to
previous state without having new documents?

Thanks
Kumar




Andreas Jung

unread,
May 12, 2012, 5:18:45 PM5/12/12
to mongod...@googlegroups.com
How should it be transactional without any transactional support within
MongoDB? So the very obvious answer is: NO

-aj
--
ZOPYX Limited | Python | Zope | Plone | MongoDB
Charlottenstr. 37/1 | Consulting & Development
D-72070 T�bingen | Electronic Publishing Solutions
www.zopyx.com | Scalable Web Solutions
--------------------------------------------------
Produce & Publish - www.produce-and-publish.com


Eric Milkie

unread,
May 14, 2012, 2:34:59 PM5/14/12
to mongod...@googlegroups.com
Hi Kumar,
The mongorestore command isn't transactional; it simply does an insert for each document. As each document is inserted, it is able to be read by queries. If you shut down mongod and run mongorestore on database files that do not have a running database server, this can simulate a transaction, as you can avoid restarting the mongod server until mongorestore completes successfully.
-Eric
Reply all
Reply to author
Forward
0 new messages