summaryrefslogtreecommitdiff
path: root/tools/restore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/restore.cpp')
-rw-r--r--tools/restore.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/restore.cpp b/tools/restore.cpp
index c08c14f..ec0e1d3 100644
--- a/tools/restore.cpp
+++ b/tools/restore.cpp
@@ -73,6 +73,11 @@ public:
_drop = hasParam( "drop" );
_keepIndexVersion = hasParam("keepIndexVersion");
+ if (isMongos() && _db == "" && exists(root / "config")) {
+ cout << "Cannot do a full restore on a sharded system" << endl;
+ return -1;
+ }
+
bool doOplog = hasParam( "oplogReplay" );
if (doOplog) {
// fail early if errors