<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 02:53:42 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-317] Copy a single collection from DB1 to DB2</title>
                <link>https://jira.mongodb.org/browse/SERVER-317</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;With the current mongodump/mongorestore, it&apos;s not possible to copy just one collection from one database to another&lt;br/&gt;
(see this thread on mongodb-user: &lt;a href=&quot;http://groups.google.com/group/mongodb-user/browse_thread/thread/daebd48eca33d3ee&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://groups.google.com/group/mongodb-user/browse_thread/thread/daebd48eca33d3ee&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;I expected to do something like this, but unfortunately mongorestore does &lt;/p&gt;

&lt;p&gt;a) always use the original DB although I specified the target DB with the -d option (I heard the nightly builds behave different) and&lt;br/&gt;
b) always restores the complete DB instead of a single collection.&lt;/p&gt;

&lt;p&gt;I thought I could copy over one collection to another DB with something like this:&lt;/p&gt;

&lt;p&gt;pinocchio:~ oliver$ mongodump -d services -c suppliers -o tmp/dump &lt;br/&gt;
connected to: 127.0.0.1 &lt;br/&gt;
DATABASE: services       to     tmp/dump/services &lt;br/&gt;
        services.suppliers to tmp/dump/services/suppliers.bson &lt;br/&gt;
                 29603 objects &lt;/p&gt;

&lt;p&gt;pinocchio:~ oliver$ mongorestore -d services_dev -c suppliers --dir &lt;br/&gt;
tmp/dump/ &lt;br/&gt;
connected to: 127.0.0.1 &lt;br/&gt;
tmp/dump/services/suppliers.bson &lt;br/&gt;
         going into namespace &lt;span class=&quot;error&quot;&gt;&amp;#91;services.suppliers&amp;#93;&lt;/span&gt; &lt;br/&gt;
read 489874/11917784 bytes so far. (4%) 1028 objects &lt;br/&gt;
... &lt;br/&gt;
read 11605076/11917784 bytes so far. (97%) 28784 objects &lt;br/&gt;
         29603 objects &lt;/p&gt;</description>
                <environment>Mac OS X</environment>
        <key id="10647">SERVER-317</key>
            <summary>Copy a single collection from DB1 to DB2</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="mike">Michael Dirolf</assignee>
                                    <reporter username="oliver">Oliver Eilhard</reporter>
                        <labels>
                    </labels>
                <created>Fri, 25 Sep 2009 13:38:12 +0000</created>
                <updated>Tue, 12 Jul 2016 00:28:24 +0000</updated>
                            <resolved>Wed, 30 Sep 2009 10:57:32 +0000</resolved>
                                    <version>1.0.0</version>
                                    <fixVersion>1.1.2</fixVersion>
                                    <component>Tools</component>
                                        <votes>0</votes>
                                    <watches>0</watches>
                                                                                                                <comments>
                            <comment id="10800" author="mike" created="Fri, 25 Sep 2009 13:43:43 +0000"  >&lt;p&gt;this will work as you described it - as long as you only dump a single collection (or specify a path to a single collection&apos;s .bson file to restore) you should be fine.&lt;/p&gt;

&lt;p&gt;note to restore to a different db you still need to be on a nightly build, not 1.0&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Fri, 25 Sep 2009 13:43:43 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        14 years, 21 weeks, 5 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            14 years, 21 weeks, 5 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>mike</customfieldvalue>
            <customfieldvalue>oliver</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hrpvtz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrivp3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>23788</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hsimzj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>