[SERVER-15829] cloneDatabase from the shell does not allow collsToIgnore parameter Created: 28/Oct/14  Updated: 24/Dec/19  Resolved: 24/Dec/19

Status: Closed
Project: Core Server
Component/s: Shell
Affects Version/s: 2.8.0-rc0
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Alvin Richards (Inactive) Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Done Votes: 0
Labels: 28qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

Problem

The js helper in the shell for cloneDatabase is as follows

 
> db.cloneDatabase
function (from) {
    assert( isString(from) && from.length );
    return this._dbCommand( { clone: from } );
}

However, this does not permit the collsToIgnore parameter to be passed. This can be done via the runCommand (see below)

Workaround

> db.runCommand( {clone: "54.191.70.12:27017", collsToIgnore: ["test.boo"]} )



 Comments   
Comment by Spencer Jackson [ 24/Dec/19 ]

The underlying cloneDatabase command was deprecated in v4.0 and removed in v4.2.

Generated at Thu Feb 08 03:39:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.