I need to copy some of the documents from a database/collection on a remote server down to a database/collection with the same name on my local host.
At first glance the
db.cloneCollection(from, collection, query) command looks perfect for this as it allows you to specify a
query parameter (which would give me the documents that I want). However I see that
it doesn't yet support authentication (and my remote server requires authentication)...
On the other hand, none of the alternatives that I can see such as db.copyDatabase(fromdb, todb, fromhost, username, password)or db.collection.copyTo(newCollection) let you specify anything analogous to a query parameter so there's no way to limit the data that would be pulled down in those cases (and the collections on the remote server are too big to practically pull down all of the data).
Is there a solution to this that I'm not seeing?
Cheers,
James