[SERVER-3560] CopyDB doesn't seem to work when copying from sharded db. Created: 09/Aug/11 Updated: 29/Feb/12 Resolved: 29/Sep/11 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | 1.8.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Greg Studer | Assignee: | Greg Studer |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
at least ubuntu linux 10.10 |
||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
Copying is incomplete or does not happen at all. Workaround is to script something like: var mongoTo = mongod; var mongoFrom = mongos; } |
| Comments |
| Comment by Scott Hernandez (Inactive) [ 03/Feb/12 ] |
|
This is not a good idea to do in javascript in 1.8.x as there are lots of data types which won't be kept through the transformation. You will not be able to keep full data fidelity. A good example of a missing type, or one that will change is an integer. It is much better to use a programming language with full data type support like java/.net/c/c++/python/ruby/etc. |
| Comment by Dominik Herbst [X] [ 03/Feb/12 ] |
|
I got the same problem with mongos and mongo 2.0.2 I tried to copy a database from mongos on another machine. db.copyDatabase('mydb', 'mydb', 'mongos.server') Command hang on first collection after 81 copied objects. I modified the script a bit to work and to give me progress of everything and it works. Just takes long to copy hundreds of GB and millions of objects: var mongoTo = new Mongo; var mongoFrom = new Mongo('mongos.server'); var collections = mongoFrom.getDB( dbFrom ).getCollectionNames(); var steps; ); ); |