summaryrefslogtreecommitdiff
path: root/src/mongo/shell/db.js
diff options
context:
space:
mode:
authorMaria van Keulen <maria@mongodb.com>2018-07-27 17:09:24 -0400
committerMaria van Keulen <maria@mongodb.com>2018-08-07 14:26:55 -0400
commit88a8b7b31ca41eca88e782d84e496911c93cc0ae (patch)
treef60e0bee8e351180ad2c256c3c8946ec35fadeb6 /src/mongo/shell/db.js
parent4c16f0f336f4db77034e8aa594bbd4a5bac3f40c (diff)
downloadmongo-88a8b7b31ca41eca88e782d84e496911c93cc0ae.tar.gz
SERVER-36257 Remove copyDB and clone commands
Diffstat (limited to 'src/mongo/shell/db.js')
-rw-r--r--src/mongo/shell/db.js16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/mongo/shell/db.js b/src/mongo/shell/db.js
index 01cd07e89e3..0304410caef 100644
--- a/src/mongo/shell/db.js
+++ b/src/mongo/shell/db.js
@@ -465,7 +465,8 @@ var DB;
};
/**
- Clone database on another server to here.
+ Clone database on another server to here. This functionality was removed as of MongoDB 4.2.
+ The shell helper is kept to maintain compatibility with previous versions of MongoDB.
<p>
Generally, you should dropDatabase() first as otherwise the cloned information will MERGE
into whatever data is already present in this database. (That is however a valid way to use
@@ -481,7 +482,7 @@ var DB;
*/
DB.prototype.cloneDatabase = function(from) {
print(
- "WARNING: db.cloneDatabase is deprecated. See http://dochub.mongodb.org/core/copydb-clone-deprecation");
+ "WARNING: db.cloneDatabase will only function with MongoDB 4.0 and below. See http://dochub.mongodb.org/core/4.2-copydb-clone");
assert(isString(from) && from.length);
return this._dbCommand({clone: from});
};
@@ -512,7 +513,9 @@ var DB;
};
/**
- Copy database from one server or name to another server or name.
+ Copy database from one server or name to another server or name. This functionality was
+ removed as of MongoDB 4.2. The shell helper is kept to maintain compatibility with previous
+ versions of MongoDB.
Generally, you should dropDatabase() first as otherwise the copied information will MERGE
into whatever data is already present in this database (and you will get duplicate objects
@@ -534,7 +537,7 @@ var DB;
DB.prototype.copyDatabase = function(
fromdb, todb, fromhost, username, password, mechanism, slaveOk) {
print(
- "WARNING: db.copyDatabase is deprecated. See http://dochub.mongodb.org/core/copydb-clone-deprecation");
+ "WARNING: db.copyDatabase will only function with MongoDB 4.0 and below. See http://dochub.mongodb.org/core/4.2-copydb-clone");
assert(isString(fromdb) && fromdb.length);
assert(isString(todb) && todb.length);
fromhost = fromhost || "";
@@ -596,9 +599,10 @@ var DB;
print(
"\tdb.aggregate([pipeline], {options}) - performs a collectionless aggregation on this database; returns a cursor");
print("\tdb.auth(username, password)");
- print("\tdb.cloneDatabase(fromhost) - deprecated");
+ print("\tdb.cloneDatabase(fromhost) - will only function with MongoDB 4.0 and below");
print("\tdb.commandHelp(name) returns the help for the command");
- print("\tdb.copyDatabase(fromdb, todb, fromhost) - deprecated");
+ print(
+ "\tdb.copyDatabase(fromdb, todb, fromhost) - will only function with MongoDB 4.0 and below");
print("\tdb.createCollection(name, {size: ..., capped: ..., max: ...})");
print("\tdb.createView(name, viewOn, [{$operator: {...}}, ...], {viewOptions})");
print("\tdb.createUser(userDocument)");